Hello -
I have a form that is being used in a Product template (so it displays on all Single Product pages) that would allow a User to submit a form to Request a Sample. I am doing this so that I am not creating thousands of forms for all of the Products on the site.
Is it possible to somehow do either of the following:
I know the Page Referrer can be included in the base of the email and it is helpful, but would like to pass additional information about the Product that someone is requesting a Sample of.
TIA
The answer to both questions is yes.
You can use jQuery to access a page title and store it in a hidden field on the form. You only need to know the title's ID and retrieve the text using something like this
$('#my_hidden_field_id').val( $('#title_id').text() );
Standard dropdowns can be populated dynamically using Formidable's frm_setup_new_fields_vars and frm_setup_edit_fields_vars hooks. If you know where the data you want is stored in the database, you can retrieve it using a SQL SELECT executed through the $wpdb object.
Here's an article I wrote in 2014 explaining how to populate a dropdown dynamically: https://victorfont.com/formidable-pro-populate-dropdown-from-table/
Thank you Victor! I will give this a try and let you know. Much appreciated.
Please login or Register to submit your answer