Passing Param in Modal Shortcode

By: Russell Guilfoile | Asked: 02/10/2023
ForumsCategory: How-toPassing Param in Modal Shortcode
Russell Guilfoile asked 1 year ago
Is it possible to pass a parameter in a modal? I have a view of Form 1 with a modal for Form 2. Here is the modal shortcode: [frmmodal-content modal_title=" " size="large" label="Form 2"][formidable id=2 exclude_fields="1474" trans_param="[383]" service_param="[384]"][/frmmodal-content] I want to pass the value in Form 1, field [383] into the modal Form 2 field with [get param="trans_param"]. Same with Form 1, field [384] into the modal Form 2 field with [get param="service_param"]. 
Bobby Clapp replied 1 year ago

Both of these are forms and not views, correct? I suspect then you are hoping on key press it bounces around the values or something like that?

Russell Guilfoile replied 1 year ago

I was imprecise in my description. The modal is in a view of Form 1. My goal is that when opening the Form 2 modal, that selected Form 2 fields populate with selected values from the Form 1 view entry where the modal is.

Bobby Clapp replied 1 year ago

So you need to load parameters in the view for form one with something like [frm-set-get contact_email="[26]"]. If the view for form 1 has more than one entry, that may cause an issue. You may need to have a detailed view that can load that parameter with the correct expected value coming from the entry.

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