We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7239
    • 14 Posts
    How would I post my eform results to a remote url after eform validation has taken place?

    I know I could use one of the eform event functions but i guess I am unclear as to how to code the fuction or write the snippet.

    Example would be I need my form to be:

    <form action="http://crm.zoho.com/crm/WebToLead" method="post">
    <input name="formID" type="hidden" value="123456789" />
    <input name="zid" type="hidden" value="123456" />
    <input name="zapi" type="hidden" value="123456" />
    <input name="actionType" type="hidden" value="123456=" />
    <input name="First Name" type="text" />
    <input name="Email" type="text" />
    


    But eform normally requires the form action to be action="[~[*id*]~]"

    Does anyone have any ideas as to how I could code an event function to post this form to my required external url?
      • 7239
      • 14 Posts
      I think that I am on the right track thinking that cURL is part of the equation I just am not sure how to create a function that will take the $fields variable from eform and have that function use CURL to send off my post before eform completes its final process.

      Here is an example of Curl being used:
      http://www.electrictoolbox.com/php-curl-form-post/
        • 1924
        • 119 Posts
        I´ve got the same problem and the curl solution with eFormOnBeforeMailSent works perfect for me. Thanks for the hint! smiley

        Alex
          • 7239
          • 14 Posts
          Would you mind posting how you accomplished this? It would be very helpful.