Skip Navigation

[Resolved] Shortcode issue

This support ticket is created 5 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by Bobby339 5 years, 10 months ago.

Assisted by: Diego Pereira.

Author
Posts
#1188226

I’m struggling to do something that seems very simple… but it just isn’t working. I have a custom field named “form ID”… this is for the ID of the gravity forms form that I want to use with this item.

The default shortcode to embed a gravity form is this:

[gravityform id=14 title=false description=false ajax=false]

Where "14" being the ID of the form. However when simply try to substitute a toolset custom field (a. Number field) like this…

[gravityform id=[types field='formid' output='raw'][/types] title=false description=false ajax=false]

The form does NOT appear, just the broken shortcode 🙁

The same issue is happening when I try to use a Vimeo video ID (a number) from a custom field in the Vimeo embed code.

Any ideas on why embedding a shortcode within a shortcode is causing them not to work?

#1188297

Diego Pereira
Supporter

Hello @Bobby339, welcome to the Toolset support Forum!

If you add the number shortcode does it return the correct value? Please add only the field shortcode:

[types field='formid' output='raw'][/types]

If it works ok and return the correct value (e.g. 14), please try the following shortcode:

[gravityform id="[types field='formid' output='raw'][/types]" title="false" description="false" ajax="false"]

Perhaps you need to wrap the attributes in to a " to make it work.

If it does not work, please temporalily switch to a default theme (like Twenty Seventeen) and check if the issue persist.

Please let me know if it worked for you.

All the best,
Diego

#1189306

OMG! It was a user-error... turns out that without VIEWS installed (and activated) shortcodes did not render correctly... at least for me. Once I installed VIEWS... everything worked without having to change any code.