• 1.
    <?php
  • 2.
    add_action("gform_post_submission", "post_to_crm_1", 10, 2);
  • 3.
     
  • 4.
    function post_to_crm_1($entry, $form){
  • 5.
        if($form["id"] != 1) //NOTE: where '1' is your gravityforms id - so replace this with your form id
  • 6.
            return;
  • 7.
        ?>
  • 8.
            <form method="post" action="https://service.capsulecrm.com/service/newlead" name="form_to_crm_1" id="form_to_crm_1">
  • 9.
    			<input id="FORM_ID" type="hidden" name="FORM_ID" value="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" />
  • 10.
                <input id="COMPLETE_URL" type="hidden" name="COMPLETE_URL" value="http://yoursuccessfulurl/" />
  • 11.
    			<input type="hidden" name="CUSTOMFIELD[yourcustomfieldname]" value="<?php echo $entry["1"] ?>" />
  • 12.
                <input type="hidden" name="FIRST_NAME" value="<?php echo $entry["2"] ?>" />
  • 13.
                <input type="hidden" name="LAST_NAME" value="<?php echo $entry["3"] ?>" />
  • 14.
                <input type="hidden" name="PHONE" value="<?php echo $entry["4"] ?>" />
  • 15.
    			<input type="hidden" name="EMAIL" value="<?php echo $entry["5"] ?>" />
  • 16.
                <input type="hidden" name="ORGANISATION_NAME" value="<?php echo $entry["6"] ?>" />
  • 17.
                <input type="hidden" name="ZIP" value="<?php echo $entry["7"] ?>" />
  • 18.
            </form>
  • 19.
            <script type="text/javascript">
  • 20.
                document.getElementById("form_to_crm_1").submit();
  • 21.
            </script>
  • 22.
        <?php
  • 23.
    }
<?php add_action("gform_post_submission", "post_to_crm_1", 10, 2); function post_to_crm_1($entry, $form){ if($form["id"] != 1) //NOTE: where '1' is your gravityforms id - so replace this with your form id return; ?> <form method="post" action="https://service.capsulecrm.com/service/newlead" name="form_to_crm_1" id="form_to_crm_1"> <input id="FORM_ID" type="hidden" name="FORM_ID" value="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" /> <input id="COMPLETE_URL" type="hidden" name="COMPLETE_URL" value="http://yoursuccessfulurl/" /> <input type="hidden" name="CUSTOMFIELD[yourcustomfieldname]" value="<?php echo $entry["1"] ?>" /> <input type="hidden" name="FIRST_NAME" value="<?php echo $entry["2"] ?>" /> <input type="hidden" name="LAST_NAME" value="<?php echo $entry["3"] ?>" /> <input type="hidden" name="PHONE" value="<?php echo $entry["4"] ?>" /> <input type="hidden" name="EMAIL" value="<?php echo $entry["5"] ?>" /> <input type="hidden" name="ORGANISATION_NAME" value="<?php echo $entry["6"] ?>" /> <input type="hidden" name="ZIP" value="<?php echo $entry["7"] ?>" /> </form> <script type="text/javascript"> document.getElementById("form_to_crm_1").submit(); </script> <?php }

Copy Code to Clipboard Raw

Sign-in or Create a Free Account.

Snippi uses Twitter or Facebook to register and create accounts. Registration will enable you to keep track of your snippets. We never spam your timeline or wall. Ever.

Sign-in with Facebook Sign-in with Twitter