Please Note: We are no longer using forums to facilitate standard support. 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.

Change behavior of default value in email field

  1. Hi,

    I'm using Gravity Forms with MailChimp for a simple email newsletter subscription form. You can see it in the right sidebar of my site. It's titled "Get iEndure Updates!"

    http://www.iendure.com

    I've set the default value for the email field to pre-populate with the words "Email address." That's fine, but when you click on the field to enter an email address, the text doesn't go away. You have to delete the words "Email address" before you can fill out the form with a real email address.

    I would like the behavior and style to match that of the search field in the top right of the website.

    Any suggestions?

    Thanks very much.

    Bruce

    Posted 3 years ago on Monday January 9, 2012 | Permalink
  2. Sounds like you want to clear the placeholder text when they click into the field. This can be accomplished with JavaScript. Here is one way:

    http://rkt.gs/clearit

    You will need JavaScript of some sort to clear the text in the field when the field receives focus. Let us know if you have any questions on implementation.

    Posted 3 years ago on Tuesday January 10, 2012 | Permalink
  3. Hi Chris,

    Yes, thank you, that is what I'd like to do - clear the placeholder text when clicking in the field.

    I tried to follow Kevin's instructions, but couldn't get it to work. I'm new to this stuff.

    I pasted the script into different spots in the header.php file to no avail. I added "clearit" to the CSS Class Name.

    Any suggestions?

    Thanks,

    Bruce

    Posted 3 years ago on Tuesday January 10, 2012 | Permalink
  4. Share a link to your form when you have the form online with the scripts and we will see what's going on.

    Posted 3 years ago on Tuesday January 10, 2012 | Permalink
  5. Hi Chris,

    It worked this time! :) Thank you. Not sure what I was doing wrong before.

    One last thing, then I'll leave you alone... How do I change the font type and font color of the placeholder text? I'd like it to match the search field above it.

    The newsletter subscription form is in the right sidebar. It's titled "Get iEndure Updates!" Here's the link:

    http://www.iendure.com

    Thanks,

    Bruce

    Posted 3 years ago on Thursday January 12, 2012 | Permalink
  6. Sorry Bruce, I lost this one for a couple days. I will ask our resident CSS expert (Rob) to take a look at this one for your CSS issue. Thanks.

    Posted 3 years ago on Wednesday January 18, 2012 | Permalink
  7. Hey Bruce, in your custom.css you have:

    .gform_widget .ginput_container input#input_2_1.medium {
    margin-bottom: 0px;
    }

    Change it to be (adding color hex #777 which is the same as the search input above):

    .gform_widget .ginput_container input#input_2_1.medium {
    margin-bottom: 0px;
    color: #777;
    }
    Posted 3 years ago on Wednesday January 18, 2012 | Permalink

This topic has been resolved and has been closed to new replies.

Support Tickets

Open A New Support Ticket
 Open A New Priority Support Ticket *

* Developer license holders only