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