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.

Add javascript into name and email fields

  1. Hi,

    I purchases the plugin the other night as I was getting so frustrated with TDO forms!

    I have a question. On one of my sites (http://www.figureofweight.com) I have added the following code so that when a user clicks on the label it removes the 'Search' text. I want to do the same on my form in Gravity forms. But I want to remove the name and email titles and have them inside the field.

    (value="Search.." onfocus="if(this.value == 'Search..') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search..';}")

    Any help is greatly appreciated!

    Posted 13 years ago on Wednesday December 1, 2010 | Permalink
  2. This forum post discusses how to use jQuery to have placeholder text that clears when a user selects the field:

    http://www.gravityhelp.com/clearing-default-form-field-values-with-jquery/

    In order to hide the First Name and Last Name sublabels you would have to use CSS to set these elements to display: none. You would add this custom CSS to your themes stylesheet and target the containers that output the First Name and Last Name sublabels.

    Posted 13 years ago on Wednesday December 1, 2010 | Permalink
  3. Wow that was quick! Thanks!

    I tried searching through the forum for a while and couldn't find it. I think I was just searching for the wrong thing.

    Posted 13 years ago on Wednesday December 1, 2010 | Permalink