Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @strongtyer,

    Not really, you cannot insert shortcode from third party plugins within the CFF forms because they can break the forms’ structures, however there is an alternative. Please, follow the steps below:

    1. In the same page where is inserted the form, insert a DIV tag with an unique ID or Class name and the shortcode of the other plugin, for example:

    
    <div class="shortcode-container" style="display:none;">[THE-SHORTCODE-HERE]</div>
    

    2. Insert in the form a “HTML Content” field with the following piece of code as its content:

    
    <div class="move-shortcode-here"></div>
    <script>
    fbuilderjQuery(document).one('showHideDepEvent', function(){
    var $ = fbuilderjQuery;
    $('.move-shortcode-here').html($('.shortcode-container').html());
    $('.shortcode-container').remove();
    });
    </script>
    

    and that’s all.

    The shortcode of the third party plugin is inserted directly in the page’s content, so, it does not affects the process of generate the form, and then, after the form be generated, I move the content of the DIV tag with the class name: shortcode-container to the form.

    Best regards.

    Thread Starter strongtyer

    (@strongtyer)

    Perfect. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Do shortcode within form’ is closed to new replies.