Support » Plugin: Calculated Fields Form » show div submit form

  • Resolved malpica

    (@malpica)


    Hi,

    I have inserted form in popup. I want when user click submit form show div with confirmation, but I don’t want that user goes to thank you page. I want it to do something like when you send a form with cf7.

    Best regards

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello,

    Our plugin does not include this feature by default, but there is an alternative to get a similar behavior:

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

    <script>
    fbuilderjQuery(document).one('showHideDepEvent', function(){
    var $ = fbuilderjQuery;
    if($('#my_iframe').length == 0)
    {
    $('body').append($('<iframe id="my_iframe" name="my_iframe" src="" style="display:none;"></iframe>'));
    }
    $('[id*="cp_calculatedfieldsf_pform_"]').attr('target','my_iframe');
    $('.pbSubmit').click(function(){
    if($('[id*="cp_calculatedfieldsf_pform_"]').validate().checkForm())
    {
    setTimeout(function(){alert('The thanks message here.');},1000);
    }	
    });
    });
    </script>

    and that’s all.
    Best regards.

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