• Resolved Fabbstar

    (@fabbstar)


    Hi there,

    Is there a function that can make the form auto-submit itself on page load?

    Thanks!
    F

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

    (@codepeople)

    Hello @fabbstar

    You simply should to insert a “HTML Content” field in the form, and enter as its content the following piece of code:

    
    <script>
    jQuery('[id*="cp_calculatedfieldsf_pform_"]').submit();
    </script>
    

    But I don’t think this behavior be very useful.

    Best regards.

    Thread Starter Fabbstar

    (@fabbstar)

    Hey!

    Thank you for your reply.

    I am using url parameters to pre-populate the form, and then I’d like it to auto-submit the form when the page loads. So it helps my users to submit the form without completing it.

    I have tried the code and the form does submit, but it doesn’t process the url parameters…I have put the html code right at the end of the form to see if this helps but I still get a confirmation email with no field data. Any thoughts?

    F

    Plugin Author codepeople

    (@codepeople)

    Hello @fabbstar

    Configure the code to be evaluated after the form be rendered, as follows:

    
    <script>
    fbuilderjQuery(document).one('showHideDepEvent', function(){
    jQuery('[id*="cp_calculatedfieldsf_pform_"]').submit();
    });
    </script>
    

    Best regards.

    Thread Starter Fabbstar

    (@fabbstar)

    You are utterly amazing, thank you! Do you like what we are trying to do here? Hopefully it will be useful to someone else.

    Many thanks,
    F

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Auto-Submit’ is closed to new replies.