Custom Shortcode?

By: Michael Clark | Asked: 11/05/2022
ForumsCategory: How-toCustom Shortcode?
Michael ClarkMichael Clark asked 1 year ago

Can anyone share the link in the documentation where you can create a custom FF shortcode based on a value in a field? I saw and have search the site and can't find it, no matter what I search on.

Here's what I need to do: I need the page to eval whether the value in a field is "active" or "inactive" and show specific content accordingly.

The page has conditional logic all set up - outside of FF - and I just need a shortcode that exposes the field value. If that makes sense.😜

3 Answers
Best Answer
Rob LeVineRob LeVine answered 1 year ago

Well, I just went off and created the following tutorial and now I kinda feel like a horse's backside because, lo and behold, it already exists in the Formidable Knowledgebase https://formidableforms.com/knowledgebase/php-examples/#kb-shortcodes, though with less detail and rambling than I added.
https://connect.formidableforms.com/user-tutorials/custom-shortcode-creation-basic/

Michael ClarkMichael Clark replied 1 year ago

That's the one I couldn't find on their site!

And don't sell yourself to short: your tutorial here is good! I have a have a sneaking suspicion that a modern, task-based, increasingly challenging tutorial series would be considerably successful with the community.

Similar to Salesforce Trailhead where designers and developers can take proscribed learning paths and also cherry pick modules to build their own learning paths.

Like Formidable's job board solution walkthrough on their site, but reimagined as a modern learning path, with an experience based in instructional design. Could even make the purpose-built LMS in Formidable.

Victor Font answered 1 year ago
There probably isn't a tutorial that teaches how to do this because apart from the fact that you must use the WordPress Shortcode API to construct your shortcode, all of the code you would use is customized to your purpose. This is an example where it may be best to arrange a paid consult with a developer. Please visit https://formidable-masterminds.com/developers-directory/ for available resources.
Michael ClarkMichael Clark replied 1 year ago

Yeah. I was looking for the link in the documentation with the sample code, not so much a tutorial.. although I think an updated tutorial series would be well received in the community 🙂

Rob LeVineRob LeVine answered 1 year ago
@Michael Clark - I'd be happy to help you with this.  I've also kinda been meaning to write a short tutorial to give the basics of it for a Formidable case.  Custom shortcodes are one of my favorite things :).
Michael ClarkMichael Clark replied 1 year ago

@Rob LeVine - curious. 🧐 Tell me more!

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