• Resolved mlchrt

    (@mlchrt)


    Hello everyone,

    I am facing a problem with Forminator. I want to have an auto-updated drop-down field that displays the current year and the next year in the list. This field should update itself and the current year should be pre-selected.

    I would appreciate any help or advice you can give me on this matter. Thank you in advance for your time and consideration.

    • This topic was modified 2 years ago by mlchrt.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    HI @mlchrt

    I hope you’re well today!

    Currently it’s not possible out of the box with “select” type field.

    However, perhaps the “datepicker” field would work for you?

    If you add such field to the form, you would need to set it to “Calendar” type and then you would be able to set:

    – “Default Date” to “Today” (which would always be “current year” then)
    – and “Limits” like “Start Date” set to “Today” with “0” and “End Date” set to “Today” with “+1 year” offset.

    The downside is users would still be able to select month and day but they would be limited to these two years only – current and next one – so, depending on how you use that data, you might be able to just “ignore” the day and month part.

    Would that work for you or it has to be specifically a regular drop-down field with only year numbers available?

    Kind regards,
    Adam

    Thread Starter mlchrt

    (@mlchrt)

    Hi Adam,

    thank you for your response! The date picker could be an option but in my use case there is no need for the day. Month could be considered but the day is too much details. I saw if I switch to the dropdown mode in the datepicker, the limits tab is away. Is there anyway to also limit the years as shown above in this view and hide the day column?

    Any other workaround for this?

    Thank you!! ??

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @mlchrt

    Unfortunately, it is not possible with dropdown but let’s check for a different alternative.

    Just to make sure we are on the same page, is it two dropdowns?

    ” I want to have an auto-updated drop-down field that displays the current year and the next year in the list. ”

    For example

    If I select the option “October” in the 2023 dropdown it auto-select “October” in the 2024 dropdown.

    Best Regard
    Patrick Freitas

    Thread Starter mlchrt

    (@mlchrt)

    Hi Patrick, I just want one drop down field with the current year and the next year. So there are two dropdowns, one is the month and the other one is the current year and the current year plus one. There is no need for the day. Any workarounds to fix this?

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @mlchrt,

    I’m afraid, at the moment there isn’t any such feature supported out of the box. However, as a workaround you could still use the “Date Picker” field and its “Dropdown” feature.

    Screenshot at 17:54:55.png

    You can then hide the “Date” field using custom CSS, for example:

    #date-1-day {
    	display: none;
    }
    
    

    So that only the Month and the Year will show up. The above CSS can be added by editing the form and under “Appearance” Tab > Custom CSS section.

    Could you please check and see whether that fits your requirement? However, even though the date is hidden, it’ll still get a value submitted for the date.

    Kind Regards,

    Nithin

    Thread Starter mlchrt

    (@mlchrt)

    Hi there, thanks for the reply. Sadly this option does not enable one to set limits to the year is auto-updated to the current year and the next. I want to have this automated. Anyways to activate the visuals of the dropdown and get the limits option of the datepicker in calendar form? Thanks and cheers!

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @mlchrt

    Thank you for response!

    I’m afraid this wouldn’t be currently possible. Those limits can be applied to calendar field but not drop-downs so it’s either this or that.

    We do have it planned to add support for limits for drop-down type of datepicker as well but this is yet to come and I don’t really have an ETA on it. It’s on a “to do” list and will be added in one of future releases.

    Kind regards,
    Adam

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @mlchrt

    I hope you are doing well and safe!

    We haven’t heard from you in a while, I’ll mark this thread as resolved.

    Feel free to let us know if you have any additional questions or problems.

    Best Regards
    Patrick Freitas

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Auto-updated value in dropdown’ is closed to new replies.