Formidable Forms is another cool WordPress form plugin. Initially, as a developer I was resistant to use any form plugins because I wanted to be able to manage the code. It turned out, though, that those form builder plugins save a ton of time. Thanks Ryan :)
I have multiple forms on my site and wanted to be able to pass a parameter so a given text field is dynamically populated. I have tried passing a get parameter with the exact form field key but it didn’t work out.
There are multiple ways to achieve this for example you can use If you prefer to write code or if you have more complex conditions you can use Formidable Forms’s filter called: frm_get_default_value
Here's a 1min video with some explanations how to pre-populate a field value dynamically.
In my case I have decided to go with the easiest one. There is a shortcode that you can use which will pull the parameter from the request. You need to paste that into the fields text box.
I have put a prefix in case I use email field in another form.
You may have to click on the field’s Field Settings to expand it.
Then you will need to link to the page that has your form and pass the parameter you’ve used above e.g. email@example.com
When you're linking to the form page do make sure that all the passed parameters are URL encoded (using php's urlencode function or an online service that does that to ensure all the data is correctly passed).
Pre-populating form fields is a good thing. That way you don’t have to make your users type additional information if you already have it stored somewhere (cookies or database). In our case when the user wanted to contact us regarding a product (support or a pre-sale question) to pre-populate the product name in the form.
In this post I showed you how to do it for one field. You can do it for all the form fields you have. It's just an extra effort but totally worth it. Another thing that we use is to partially pre-populate the message in case the potential client want's to ask some pre-sale questions.