Lightbox form -- can't get value/param needed for url

By: Venue Llama | Asked: 01/25/2023
ForumsCategory: General questionsLightbox form -- can't get value/param needed for url
Venue Llama asked 2 years ago

Thanks in advance for everyone's ongoing help with this project. I'm very new to FF and coding in general, so forgive my  my ignorance with terminology etc. -- anyways, all your assistance  is greatly appreciated.   I have a lightbox form that links from one of my listing views. But i'm trying to populate/pasa the 'venue' value (from the listing view) through one of the fields in this form, so when the link to 'rate this venue' is clicked, it populates the correct venue in the 'venue' field in the lightbox form. Before I tried the light box code, I had a plain, non-lightbox form link in my listing view and it seemed to work perfectly. I used this: <a href="https://website.com/ratecard?entry=[id]">RATE VENUE NOW</a> And when a user clicks this from the listing view, the form displays with the venue pre-selected/populated in the venue field.  But I cannot accomplish this with the lightbox code provided: [frmmodal-content label= LINK][formidable id=x][/frmmodal-content]  Is it possible to accomplish this?   Problem:   Thanks!
VL

1 Answers
Rob LeVineRob LeVine answered 2 years ago
You can pass parameters to the Formidable form or by putting it in the shortcode, e.g., [formidable id="x" my_param="value"] or [display-frm-data id="123" my_param="value"]
Venue Llama replied 1 year ago

Thanks Rob, but i'm having no luck -what am i doing wrong? I tried pasting this as the link to the lightbox form in the listing view -- the form does pop up, but the venue field remains blank and doesn't not populate w/ the venue name from the listing.

[frmmodal-content label= TEST7][formidable id="32" [6]="entry"][/frmmodal-content]

Thanks for your help!

I also tried

[frmmodal-content label= TEST7][formidable id="32" Venue Name="value"][/frmmodal-content]

[frmmodal-content label= TEST7][formidable id="32" Hidden="value"][/frmmodal-content]

Rob LeVineRob LeVine replied 1 year ago

None of those will work, especially the first :). The rule is pretty straightforward for parameter conventions. Let's say you want to pass the value that is someone's last name. In the shortcode, you do the following [formidable id=1 last_name="[6]"] where 1 is the form id and [6] is the shortcode of the filed holding the last name. Then when you want to retrieve the value, you use [get param="last_name"]

In your first try, you have the shortcode on the left side of the equal sign and the parameter name on the right.
Second try, you have a space between "Venue" and "Name". It's good practice to use all lowercase and use underscores or hyphens if you want to have multiple words.
Third try, in theory, that'd be ok if, on the form or view, you're using [get param="Hidden"] and "value" was the actual value you wanted to pass.

Venue Llama replied 1 year ago

<p><p>No dice - among several other things, tried this: [frmmodal-content label= TEST25] [formidable id=32 venue="[6]" get param="venue"] [/frmmodal-content] A. I don't know the syntax of how to structure these short codes or how much I can jam in between the brackets - so that's prbaboy the most glaring issue B. As mentioned, I'm able to get this to function properly by using a simple HTML / AHREF link to my rating form --using this link:  <strong><a href="<a href="https://venuellama.com/dev/ratecard?entry=%5Bid%5D">RATE&quot; rel="nofollow">https://venuellama.com/dev/ratecard?entry=%5Bid%5D">RATE</a&gt; VENUE</a></strong></p><p> </p><p>Once that's clicked, it takes me to the rate card form, and the venue field is correctly populated from the listing -- I just don't konw how to translate an HTML link into the short code to make this work with the lightbox. I want the lightbox because I don't want a user to have back click once the form is completed, I want them to stay where they are, on the listing view page. C. I've been also trying everything here: <a href="<a href="https://formidableforms.com/knowledgebase/get-a-value-from-an-entry/&quot&quot; rel="nofollow">https://formidableforms.com/knowledgebase/get-a-value-from-an-entry/&quot</a&gt;; rel="nofollow"><a href="https://formidableforms.com/knowledgebase/get-a-value-from-an-entry/</a&gt&quot; rel="nofollow">https://formidableforms.com/knowledgebase/get-a-value-from-an-entry/</a&gt</a&gt;; I appreciate your help -- if you want to take this off-forum, kindly let me know how best to proceed. Thanks!</p></p>

Bobby Clapp replied 1 year ago

Not sure if this is on topic, but try adding a dynamic class to it. Something like class="my-style-[id]" or [frmmodal-content label= TEST25 my-style-[id]] [formidable id=32 venue="[6]" get param="venue"] [/frmmodal-content]. I find many forms with pre-filled data need a unique class to know which modal to pull up. If dynamic doesn't work, hard code in a fake unique ID or term or whatever. It may help.

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