frm-set-get not working within a form? what am I doing wrong?

By: Andrew Leonard | Asked: 04/01/2025
ForumsCategory: General questionsfrm-set-get not working within a form? what am I doing wrong?
Andrew Leonard asked 3 weeks ago

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? 

3 Answers
Victor Font Staff answered 3 weeks ago

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]

Andrew Leonard answered 3 weeks ago

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?

Victor Font Staff replied 3 weeks ago

Get rid of the quotes around the word "topic". Adding quotes makes it a text string instead of a parameter.

Andrew Leonard replied 3 weeks ago

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).

Victor Font Staff replied 3 weeks ago

Pass them both in the same shortcode.

Andrew Leonard replied 3 weeks ago

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"]

Andrew Leonard answered 3 weeks ago

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]

Attachments
Victor Font Staff replied 3 weeks ago

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.

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