Populating form field from with entry from Checkboxes from another form

By: Rex AZ | Asked: 09/10/2024
ForumsCategory: General questionsPopulating form field from with entry from Checkboxes from another form
Rex AZRex AZ asked 1 month ago
I have a registration form (Form A) and a blank text field I want to populate with values from Form B; taking into cognizance that a user will fill out Form A first before filling Form B. The fields in Form B that I want to use their values to populate the field in Form A are checkboxes that use separate values. I have tried every method, from creating a view with Form B to using the [frm-field-value] shortcode to some other custom hooking; none worked. So, how do I get the value from the fields in Form B and populate it in the field in Form A? Also, so that you know, I want to do this for every new record and existing record. Please see me through on this. Thanks
2 Answers
Victor Font answered 1 month ago
What you should do is use the frm_after_create_entry hook to add the value you want to form A. If you don't have a default value in the text field in Form A, it won't exist in the database. Formidable doesn't save empty field values. You have to add it. See: https://formidableforms.com/knowledgebase/frm_after_create_entry/ and https://formidableforms.com/knowledgebase/php-examples/#kb-update-a-field-value
Rex AZRex AZ replied 1 month ago

Thanks, Victor... I will try it.

Rob LeVineRob LeVine answered 1 month ago
You can use https://formidableforms.com/knowledgebase/frm_setup_new_fields_vars/ (new) and https://formidableforms.com/knowledgebase/frm_setup_edit_fields_vars/ (updating) to populate field values. I don't understand how you plan to populate a new entry in Form A when you don't even have a related Form B entry but regardless, that's how you can do it. You might need to come up with your own SQL commands.
Rex AZRex AZ replied 1 month ago

Thank you, Rob... I will get right on into it.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right