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.

How do I add a title attribute to a field/drop down menu

  1. Christinarule
    Member

    I'm trying to create a input and drop down field with the title in the box already. Similar to http://me.com

    Posted 12 years ago on Thursday April 19, 2012 | Permalink
  2. See if this post helps:

    http://www.gravityhelp.com/forums/topic/label-placement-in-field

    Posted 12 years ago on Thursday April 19, 2012 | Permalink
  3. Christinarule
    Member

    Thanks I will check that out. Is there a way to set a default value for a drop down field?

    Posted 12 years ago on Thursday April 19, 2012 | Permalink
  4. Well, the "default value" for a drop down field upon creation is the first choice of the drop down. Care to share a little more details?

    Posted 12 years ago on Thursday April 19, 2012 | Permalink
  5. Christinarule
    Member

    by default in the twentyeleven theme is js installed?

    Posted 12 years ago on Thursday April 19, 2012 | Permalink
  6. Christinarule
    Member

    Sure! Thanks so much for helping me out so quickly Rob! The site is http://montcocomputers.com the "Make" and "model" fields are the ones I'm trying to get to "clear" when someone attempts to enter in text. I've switched to the "twenty eleven" theme to try and pin pointe where the issue is coming from. I've set the default text for each field and I've added the CSS Class Name "clear it". I've also added the script below to the "twenty eleven" header.php (the first line of head.php is where I added the script:

    <script type="text/javascript">

    jQuery(document).ready(function() {

    jQuery.fn.cleardefault = function() {
    return this.focus(function() {
    if( this.value == this.defaultValue ) {
    this.value = "";
    }
    }).blur(function() {
    if( !this.value.length ) {
    this.value = this.defaultValue;
    }
    });
    };
    jQuery(".clearit input, .clearit textarea").cleardefault();

    });

    </script>

    All my plugins are disabled and I've using GF Version 1.6.3.3.4

    Posted 12 years ago on Thursday April 19, 2012 | Permalink
  7. I don't see Make or Model fields on that URL you provided.

    Posted 12 years ago on Friday April 20, 2012 | Permalink
  8. Christinarule
    Member

    I actually got it fixed. Sorry I may have been working on it when you tried to preview it. I do have one additional question if you have time to look into it. For the Drop down menus I have the default value at "Select a Product" I want this to be the title...not an actual drop down value. Is it possible to have a default name like in the form fields? My concern is that people will submit the form and not be required to "Select a Product" Thanks

    Posted 12 years ago on Friday April 20, 2012 | Permalink
  9. Christinarule
    Member

    Anyone? :)

    Posted 12 years ago on Monday April 23, 2012 | Permalink
  10. Christinarule
    Member

    Thank you!!!!

    Posted 12 years ago on Monday April 23, 2012 | Permalink
  11. No problem, glad to help out!

    Posted 12 years ago on Monday April 23, 2012 | Permalink