Issues using shortcodes in default values.

By: Joshua Hebbel | Asked: 02/03/2025
ForumsCategory: General questionsIssues using shortcodes in default values.
Joshua Hebbel asked 13 hours ago

I am having 2 shortcode issues;

Issue 1
I am trying to merge a text field that has the entered name and address field but the address is not showing up
where 44 is the name and 45 is the address field(s)
[44] - [45]
this only returns "John Doe -"
no address

Issue 2
Trying to show a field value only if a radio button has a certain option ticked
[28][if 28 equals="Window"] - [29][/if 28][if 28 equals="Door"] - [30][/if 28]
the shortcodes logic is not being evaulated the only shortcodes working are the non logic ones.

Bobby Clapp Staff replied 5 hours ago

For issue 2, is this being evaluated on a live form or in a view where entries have been populated?

Joshua Hebbel replied 5 hours ago

@Bobby Clapp its in the default value field for a textbox

Bobby Clapp Staff replied 4 hours ago

To me that sounds like the conditional values are attempted at being evaluated live then based on the radio in the same form. You're going to have to introduce some javascript here I think. The field values in the same form cannot be evaluated via the conditional shortcode until they have been saved. You'll need some javascript to perform the "live" conditional checks. A more "conditional" version of this:

https://formidableforms.com/knowledgebase/javascript-examples/#kb-get-option-label-from-radio-button

When the radio value "changes", do something and populate other field values.

1 Answers
Victor Font Staff answered 10 hours ago

The first issue I see is that you are not concatenating the fields. The proper way to concatenate two fields with a dash between them is [44]+"-"+[45]

Joshua Hebbel replied 5 hours ago

It works as I posted when using a field other than address

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