Formidable frm-field-value shortcode not working

By: William Lowe | Asked: 12/23/2022
ForumsCategory: General questionsFormidable frm-field-value shortcode not working
William Lowe asked 1 year ago
I'm experimenting with adding text from a Formidable form to a page using this shortcode: [frm-field-value field_id=45 entry_id=9] However, I can't get it to work.  The shortcode is right out of the Formidable Shortcodes article.  I'm pretty new to WordPress, but I'm using a few shortcodes from other plugins successfully elsewhere on the same site.  On this same page I have tried the shortcode [formidable id=5] and the form embeds correctly. I'm sure there is something simple I'm missing, but I can't figure it out.  I notice that the entry shortcode doesn't reference Formidable itself as the embed form shortcode does; could it have something to do with that? I appreciate any help.
4 Answers
Victor Font answered 1 year ago
The shortcode parameter should be entry= not entry_id=
William Lowe answered 1 year ago
Thanks, but that doesn't work (with or without quotes around the number).  I'd noticed the inconsistency in the Formidable articles I had found and I had tried entry= already. I'm still puzzled as to how the shortcode processor knows that frm-field-value refers to Formidable.  I have WPForms installed on the site and wondered if there might be some conflict but disabling it didn't help. Is there some code that has to be installed somewhere to make the shortcodes work?
Victor Font replied 1 year ago

No. Shortcodes work out of the box. All shortcodes have to be registered with The WordPress Shortcode API. Once registered in the plugin’s setup routine, Formidable simply calls do_shortcode() and WordPress takes care of the rest. That should help clarify the puzzle.

William Lowe answered 1 year ago
OK, thanks Victor.  Seems like a mystery why it's not working for me.
Victor Font replied 1 year ago

Without deeper troubleshooting on your site, it's not possible to say why it's not working. Are you sure field 45 in entry 9 has a value saved in the database?

William Lowe replied 1 year ago

Yes, I'm sure. Interestingly, I found a way to list all the active shortcodes in my WordPress installation, and the only Formidable shortcode registered is [Formidable] (which embeds a form on a page]. None of the others referenced in the Formidable knowledgebase articles are there. Also, I found a hint in one of the articles that you can only use Formidable shortcodes in a View; supposedly you create a view with the shortcode then embed the View on a page. I'm going to experiment with this later today. Thanks again for your help.

Victor Font replied 1 year ago

I'm so used to doing shortcodes the WordPress way that I forget in the early days, I think Formidable did something proprietary with how they execute shortcodes. At least, when I tried to extract shortcode related content from Formidable's source code when I was creating the Formidable Codex, I couldn't make heads or tails of how the shortcodes where being generated. I haven't revisited this this topic since.

Shelon pounds answered 3 months ago

This wasn't working for me either and was driving me nuts.  Thought I would post here in case someone can explain why this doesn't work and in case the solution I found can help someone else.  I haven't seen this documented anywhere.

Problem: Values are not transferring from fields in Form 1 to fields in form Form 2 that have a default value of [frm-field-value ...].

Solution: Perform the value transfer test on pages that do not recognize me as logged into my WordPress admin account.

Background:
1. I have a confirmation enabled with 'redirect to URL' for Form 1 (settings > actions & notifications).  The redirect URL ends with ?pass_entry=[key sanitize_url=1].  Form 1 is embedded in Page 1 web page.

2. I have the default values for the fields on Form 2 that are to receive the values from Form 1 set to [frm-field-value field_id=999 entry=pass_entry] with 999 changed to the field numbers from Form 1 for the corresponding fields.  Form 2 is embedded in Page 2 web page.

3. I open a new tab, navigate to Page 1, enter test values, click submit. I'm taken to Page 2, but the test values do not appear in Form 2. I realized this was happening with me logged into my WordPress admin account.  When I navigate to Page 1 in a new tab, I can see the WordPress admin bar at the top of the page.

4. Success.  When I navigate to Page 1 in an incognito window, I don't see the WordPress admin bar at the top of the page, I enter my test values and click submit.  I'm taken to Page 2 and now the test values appear in Form 2. Page 1 and Page 2 are test pages and are publicly viewable (don't require login).

When I'm done with my preliminary testing I will change these pages to require a login. Hopefully the value transfer continues to work when I make that change.

Is this expected behavior?   Can you explain why this is happening in this way?

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