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.

Styling field boxes on click

  1. thomas.griffin
    Member

    I'm not quite sure how to style the field boxes on click? I can style them as is, but I want to control the style when the user clicks on the field box. How can I do this?

    Thomas

    Posted 14 years ago on Wednesday September 15, 2010 | Permalink
  2. you're probably looking for something like this... using the ":focus" pseudo-selector

    input[type=email]:focus, input[type=text]:focus, input[type=url]:focus, input[type=phone]:focus, textarea:focus, select:focus {border:1px solid #f00}

    Posted 14 years ago on Wednesday September 15, 2010 | Permalink
  3. thomas.griffin
    Member

    Just what I was looking for! Thanks :)

    Posted 14 years ago on Wednesday September 15, 2010 | Permalink
  4. I am Max
    Member

    hi,

    we got the same problem but not sure where this pseudo-selector to be placed. Please tell me.i am totally new to GF.i have made a widget for GF and what the same functionality as on click to disappear the text.

    Thanks

    Posted 14 years ago on Wednesday September 15, 2010 | Permalink
  5. You would just append this to the end of your theme's style.css file (or whatever the default stylesheet name is)

    Posted 14 years ago on Wednesday September 15, 2010 | Permalink
  6. I am Max
    Member

    Thanks for your reply..

    But i want to disappear the default text from the input control when i focus that input control.Please guide me.

    Thanks

    Posted 14 years ago on Thursday September 16, 2010 | Permalink
  7. Sorry, you'll need to do that with jQuery.

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

    Posted 14 years ago on Thursday September 16, 2010 | Permalink