PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Javascript in HTML Field?

  1. I've got an AdWords Conversion Script I need to add to the simple contact form on a client website. It's a standard JavaScript. Do I add this to the HTML field on a form?

    It takes Google up to 24 hours to report conversions, so it's difficult to tell if the script is working...hence my question. Thanks in advance!

    CONTACT FORM ADDRESS: rcinc.com/contact/

    Posted 14 years ago on Friday September 24, 2010 | Permalink
  2. Is this the script that should appear after a form is submitted? If so you can use the confirmation text for this script... or redirect to a page for the thank you page and place the script on that page.

    If it's script that needs to appear on the form itself, it can either go in the form description or in an HTML field.

    Posted 14 years ago on Friday September 24, 2010 | Permalink
  3. Perfect! I added the JavaScript just below the default "Thanks for contacting us! We will get in touch with you shortly" confirmation text. I tested the form and saw only the default text as expected.

    So, just to be extra clear: The confirmation text field is actually an HTML field, yes? I won't know for 24 hours, otherwise I would just check myself to be sure.

    Posted 14 years ago on Friday September 24, 2010 | Permalink
  4. Yes, the confirmation text field is an HTML field. You can also setup a static thank you page and redirect to it instead of using the confirmation text field.

    Posted 14 years ago on Friday September 24, 2010 | Permalink
  5. Hi. I have to do the same thing... add AdWords tracking code to Gravity Forms. Do I just add the AdWords tracking code to the bottom of the javascript on forms.js?

    Posted 13 years ago on Friday January 28, 2011 | Permalink
  6. Don't change any of the core files because when you upgrade, you will lose those changes.
    You can add the AdWords Javascript into the form's confirmation text. You can see the confirmation text section when editing a form in your WP admin.

    Posted 13 years ago on Saturday January 29, 2011 | Permalink
  7. Hi Alex, I must be missing something because I looked for that first. I know where the text is for the email text confirming that the contact form was sent... and I know where the text is for sending the administrator notification that a form was sent. But I don't know where to find the form's confirmation text *within* the plugin's dashboard. Cn you point me in the right direction? Thanks so much.

    Posted 13 years ago on Saturday January 29, 2011 | Permalink
  8. I think I found it... in the form name... third tab called "Conformation"... I added the AdWords tracking code underneath the text. Is that correct? Thanks for your patience.

    Posted 13 years ago on Saturday January 29, 2011 | Permalink
  9. Yes, you got it!

    Posted 13 years ago on Sunday January 30, 2011 | Permalink
  10. Thank you!

    Posted 13 years ago on Sunday January 30, 2011 | Permalink