Our site has some very complicated form controls that are submitted and then show up again on the results page in case users want to resubmit the form from the results page.
Currently, this requires a lot of if-then statements to preset the form controls to what was submitted.
I’m wondering if there is a library (preferably jquery) that can take the cgi parameters from the URL and then update the form to those values onready. Or if there is a slicker way that I’m not seeing even better. We use perl as our programming language.
http://www.reach1to1.com/sandbox/jquery/testform.html
This plugin takes JSON data and updates the form as desired.
This plug creates JSON from the cgi parameter string
http://benalman.com/code/projects/jquery-bbq/examples/deparam/
Put them together and add a class to any forms you want to apply this to and here you go in a one-liner to run on doc ready.