• Resolved ra2or

    (@ra2or)


    Is it possible to add a wordpress shortcode in the forms?

    • This topic was modified 4 weeks, 1 day ago by ra2or.
Viewing 1 replies (of 1 total)
  • Plugin Author CodePeople2

    (@codepeople2)

    Hello @ra2or

    No, I’m sorry, that’s not possible because we cannot ensure the final code doesn’t break the form structure. However, you can insert the shortcode on the same page where you inserted the form, and move the resulting code into the form after it is rendered.

    For example, assuming you have the shortcode [my-shortcode] and want to display its result in the form. First, you must insert the shortcode into the form by using a tag similar to:

    <div id="outside-container">[my-shortcode]</div>

    Finally, insert an “HTML Content” field in the form with the following piece of code as its content:


    <div id="inside-container"></div>
    <script>
    fbuilderjQuery(document).one('formReady', function(){
    fbuilderjQuery('#inside-container').html(fbuilderjQuery('#outside-container').html());
    });
    </script>

    The previous code moves the code generated by the shortcode into the form after rendering the form. Please remember to insert the form shortcode on the same page.

    Best regards.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.