Okay here is what you need to do.
1. Your hardcoded form is fine, except change the post method from POST to GET so that it uses GET and passes the selected value via the querystring. Change the post action for this form so that it points to your WordPress page containing your Gravity Form.
2. Edit the Gravity Forms you want the hardcoded form to pre-populate.
3. Add a drop down field to your form that contains the SAME exact values as the field hardcoded select field above. You can choose to display this or not on this form later, but either way it needs to exist.
4. Edit the drop down field you created in step 3 above and go to the Advanced tab. Check the "Allow field to be populated dynamically" checkbox and enter a parameter name of "choice" without the quotes so it matches the name of the select field in Step 1 above.
5. Save your form.
Now if you setup the above steps properly, when you submit your hardcoded form it will use GET to go pass that value to the WordPress page containing your Gravity Form in the querystring as choice=SELECTEDVALUE. Your form will then pre-populate the drop down you created in Step 3 above with that value.
Just keep in mind the values of the drop down in Step 1 and Step 3 above have to be identical so it can match up with an existing value.
If you want to hide the drop down on your Gravity Form you can edit it, selected the Advanced tab and make the visibility Admin Only.
Posted 14 years ago on Thursday December 9, 2010 |
Permalink