I would like to add this string to my form tag in GF.
<input type="hidden" name="sfga" value="XXXXXXXXXXXXXXXX"/>
How do i do it in GF using hidden fields. I tried with HTML but it gives blank page & wouldnt parse the fields to Salesforce.
Paul
I would like to add this string to my form tag in GF.
<input type="hidden" name="sfga" value="XXXXXXXXXXXXXXXX"/>
How do i do it in GF using hidden fields. I tried with HTML but it gives blank page & wouldnt parse the fields to Salesforce.
Paul
What exactly are you trying to do? You can't add static markup to the forms like this, they are dynamic. If you explain what you are trying to do in more detail we may be able to provide alternative solutions.
I too am looking for a solution to this.
Basically, client wants to integrate the form with SaleForce's web-to-lead. It's pretty basic but will require me to add the following to the Gravity Form.
<form action="https://www.salesforce.com/servlet/servlet.WebToLead?
encoding=UTF-8" method="POST">
<input type=hidden name="oid" value="XXXXXXXXXXXXXX">
<input type=hidden name="retURL" value="http://">
Obviously, I hid the value..
What is the best way to do this?
You can't change the form action of a Gravity Form, so you can't change the form action to point to SalesForce. Well, I say you can't... you can using a hook BUT once you change the form action, Gravity Forms no longer has control over the form and can't perform any kind of validation, etc. So it is possible, but not recommended.
The proper way to integrate with a 3rd party service is via the use of hooks and custom PHP. You would use the gform_post_submission hook and write custom PHP so that when the form is submitted your code executes and integrates with the 3rd party service API or posts data to it then.
Here is a forum post that discusses their usage:
Here is documentation on the gform_post_submission hook:
http://www.gravityhelp.com/documentation/page/Gform_post_submission
Here is documentation on the Entry object:
http://www.gravityhelp.com/documentation/page/Entry_Object
You would write custom code using these and place them in your themes functions.php file to execute them.
Thanks Carl for the quick response. I will dig into this.
What about just adding the hidden fields? What's the best method there?
Fields can only be added the form using the form editor. So you'd have to add hidden fields to your form using the form editor and use the default values to populate them or use PHP and hooks to dynamically populate their values. You'd then have to use the gform_post_submission hook to post to SalesForce when the form is submitted.
Yeah.. I got that. I am trying to do it via the redirect too..but I can't get the hidden fields to contain the right information.
I add a Hidden Field in the form editor, but there is no real option to just add the HTML I need to in order to get:
<input type=hidden name="oid" value="XXXXXXXXXXXXXX">
<input type=hidden name="retURL" value="http://">
Correctly coded when I view the source...
What is the best options to choose via the Hidden field option within the form editor to get those tags formatted correctly as listed above?
I'm trying to find a solution for this as well.. but let's be clear, the issue is not with integrating Gravity Forms to SF -- INSTEAD, it's SalesForce & Google Adwords integration.
Getting Gravity Forms to send data to SF is easy - either of these two links will help ::
http://www.seobywebmechanix.com/wordpress-salesforce-integration-gravity-forms-web-to-lead
&&
http://wordpress.org/extend/plugins/gravity-forms-salesforce/
BUT WHEN IT COMES TO "SFGA" (SalesForce Google Adwords) - we cannot complete the step by step guide because of 2 things:
1 - Need to add hidden field <input type="hidden" name="sfga" value="xxxxxxxxxxxx"> -- can't do so w/ GF, but can do with custom jQuery
2 - Even if you do #1 w/ jQuery, upon submitting the form, it hangs on https://lct.salesforce.com/sfga -- I THINK this is because the input names are not "first_name" etc.. instead are the GF "input_1" etc..
Here is the SFGA JS code:
https://lct.salesforce.com/sfga.js
You are told to put this on your site:
<!-- Begin Salesforce Tracking Code, Place immediately before closing </BODY> tag -->
<SCRIPT type="text/javascript" src="https://lct.salesforce.com/sfga.js"></SCRIPT>
<SCRIPT type="text/javascript">__sfga();</SCRIPT>
<!-- End Salesforce Tracking Code, Place immediately before closing </BODY> tag -->
If Gravity Forms got this working, a WHOLE NEW MARKET will open up!
It it true ? We cannot use google adwords app for salesforce if we are using gravity forms to submit our lead capture data to SF?
Thanks
G