Conditional logic based on year slider possible?

By: Florian Minck | Asked: 03/17/2025
ForumsCategory: General questionsConditional logic based on year slider possible?
Florian Minck asked 7 hours ago

Hi forum members,

I have the following situation.
My data includes a Start Year and an End Year. 

Now the customer should make a year selection from a slider/dropdown menu.
But as a result in the form the form should check if user selected year is greater or equal to "Start year" and lower or equal to "End year". Only if both conditions are true (WAHR) user can select further fields.

Is there a way to solve this?

Thanks for your help.

Best,
Florian

Attachments
1 Answers
Victor Font Staff answered 5 hours ago

There are different ways to solve this problem. It depends on your design. You say "your data" includes the dates. What data? Is the user inputting the dates or are you using a lookup. If you're using a drop down, just populate the voices with the values that fall between the two years. 

Florian Minck replied 5 hours ago

Hi Victor,

thanks for your quick feedback.
So "my data" show the start and end year in the columns shown in my attached picture of my original post.
In addition to this columns there is further columns like "car manufacturer", "model" and such.

The user should only input the year of registration of his car. And I thought I could use a drop-down for the users selection.

But I am struggeling on how to "code" the check if the user entry falls between start and end year "conditions".

0

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right