Hi -
I'm trying to pass values into a form field using frm-set-get. It's a form I use across multiple pages as a journal entry for users, and I want to pass a page-specific string into a hidden field that basically sets the "subject" of the journal that can be spit out into a view later.
Prior to the shortcode that calls the form, I have another block that does this:
[frm-set-get topic="Here's an example subject of a journal entry”]
And then in the hidden field later in the page I call:
[get param="topic"]
I've tried all the combinations of double/single quotes (or not using quotes) for the variable, but no matter what I do the field shows up as blank.
I'm basically trying to replicate the functionality of Gravity Forms where a value can be passed into a field on load by a shortcode (which was like this: [gravityforms id="1" field_values="event_name=My Awesome Event"] -- see here: https://docs.gravityforms.com/using-dynamic-population/#h-shortcode )
Is this possible, or am I doing something wrong?
The shortcodes shouldn't be in separate blocks. They shortcakes need to be adjacent yo each other as in the Knowledgeable example:
[frm-set-get contact_email="[26]"]
[formidable id=x]
Still doesn't work, even adjacent.This is what I have.[frm-set-get topic="Here's a test field”][formidable id=31]And then in the form, I put I a field:[get param="topic”]... and it still shows up blank?
Get rid of the quotes around the word "topic". Adding quotes makes it a text string instead of a parameter.
Ok; got it -- works now. Is there a way to pass two parameters in a shortcode? I've done this:
frm-set-get topic="Reflect on this test post"]
[frm-set-get topic-subhead=“Module 1"]
[formidable id=31]
But the second topic-subhead parameter gets garbled when it's called (see attached image).
Pass them both in the same shortcode.
What's the format?
These all end up in the same way (or more broken) as the image I posted:
[frm-set-get topic="Reflect on this test post" frm-set-get topic-subhead=“Module 1"]
[frm-set-get topic="Reflect on this test post"; frm-set-get topic-subhead=“Module 1"]
[frm-set-get topic="Reflect on this test post"; topic-subhead=“Module 1"]
[frm-set-get topic="Reflect on this test post" topic-subhead=“Module 1"]
[frm-set-get topic="Reflect on this test post", topic-subhead=“Module 1"]
[frm-set-get topic="Reflect on this test post", frm-set-get topic-subhead=“Module 1"]
Image of where it's at now, with two attempted parameters, based on the format:
[frm-set-get topic="Reflect on this test post"]
[frm-set-get topic-subhead=“Module 1"]
[formidable id=31]
try changing the topic-subhead to topic_subhead. WordPress may be converting the character to an HTML entity. I don't know for certain because I can't see the URL query string in the image.
Please login or Register to submit your answer