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.

Edit Years in Dropdown List

  1. Hello, I am using a dropdown for date selection and the years available are 1920-2011. I need to edit these. Can you tell me where to find this? Thanks, Julie

    Posted 12 years ago on Monday November 7, 2011 | Permalink
  2. PS - also need to know how to get Month, Date and Year dropdowns all on one line. Thanks!

    Posted 12 years ago on Monday November 7, 2011 | Permalink
  3. Julie, this should help you out:

    http://www.gravityhelp.com/documentation/page/Gform_date_min_year

    http://www.gravityhelp.com/documentation/page/Gform_date_max_year

    For lining things up in columns, you can reference the css ready classes:

    http://www.gravityhelp.com/documentation/page/CSS_Ready_Classes

    Posted 12 years ago on Tuesday November 8, 2011 | Permalink
  4. Thanks. I added this to the gravityforms.php file - this wasn't specified in the links so thought I'd add that here in case it will help someone out in the future. To sort most recent year to furthest away, you just swap the two statements.

    Posted 12 years ago on Tuesday November 8, 2011 | Permalink
  5. Julie, you'll actually want to put those php statements into your functions.php file of your theme. So plugin updates won't negatively impact customizations.

    http://www.gravityhelp.com/documentation/page/Where_Do_I_Put_This_Code%3F

    Posted 12 years ago on Tuesday November 8, 2011 | Permalink
  6. Ok, will do.

    the classes don't seem to be working - I've tried the inline and the three column - could you look? http://adhocbands.com/testing/the-ricardo-pena-group-latin-variety-rock-band/

    Posted 12 years ago on Tuesday November 8, 2011 | Permalink
  7. It doesn't look like you are using the gravity forms default stylesheet. The ready classes come in through that. In the Settings section where you put in your license key there is an option to output CSS, if you change that to yes it should work.

    Posted 12 years ago on Tuesday November 8, 2011 | Permalink
  8. I have Output CSS set to yes so still need some help here.

    Also, when I add the php function to the functions.php, it breaks so am having to stick with adding this to gravityforms.php for now.

    Posted 12 years ago on Tuesday November 8, 2011 | Permalink
  9. What kind of error are you getting when you add it to your functions.php file?

    If you are embedding the form you will need to enqueue scripts and styles:

    http://www.gravityhelp.com/documentation/page/Gravity_form_enqueue_scripts

    Posted 12 years ago on Tuesday November 8, 2011 | Permalink
  10. You have to add the code to your theme's functions.php, NOT gravityforms.php. Replace the Gravity Forms files you have modified with the originals (download the plugin again if you need to) and then put the code in functions.php. If it gives an error, post the error here, as Rob suggested. Or, even better, post the whole functions.php at pastie.org or pastebin.com so we can see where your error is coming from. You need to get it working in functions.php.

    Posted 12 years ago on Tuesday November 8, 2011 | Permalink
  11. Ok, on the years issue, tried it a couple of more times and it is now working okay.

    The CSS though isn't. I have the Settings set to Output CSS. I also copied all of the gravity forms css into my theme's styles.css because the CSS from the plugin has never appeared to have any impact. On the month/day/year field, I have the gf_inline as the css class name and it appears this is reading from the styles.css but, in any case, still wrapping.

    Posted 12 years ago on Tuesday November 8, 2011 | Permalink
  12. On line 496 of your style.css change place this:

    [css]
    .gform_wrapper li.gf_inline div.ginput_container {
        display: inline;
        white-space: nowrap !important;
        width: 60%;
    }

    Added display: inline to that declaration that was there.

    Posted 12 years ago on Tuesday November 8, 2011 | Permalink
  13. Thanks, worked!

    Posted 12 years ago on Tuesday November 8, 2011 | Permalink
  14. Awesome! Glad to help.

    Posted 12 years ago on Tuesday November 8, 2011 | Permalink

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