Forum Academy Marketplace Showcase Pricing Features

Selected date + dropdown with day, week, month year

Hello there,

I have a form where the user can select a start date and the period of a contract. To make it easy for the user they can choose in a dropdown:
1 day
1 week
2 weeks
3 weeks
4 weeks
1 month
3 months
1 year
2 years, etc.

How can I calculate the end date from these values? I can work with options and then create an attribute for the number of days. But a month is not always 31 days and a year is not always 365 days. What to do here?

Anyone?

You can select in the action to start date = date time picker, and then make changes to Result of step 1 only if dropdown value was “1 day” end date = date time picker + 1 day. And the other make changes to Result of step 1 with the condition in the dropdown. And so on. :slightly_smiling_face::computer:

1 Like

Ahhhhh thanks. So to make sure I get it. I make an attribute like this:
display - attribute 1 - attribute 2
1 day - day - 1
1 month - month - 1
3 month - month - 3
And then make actions:
date time picker + day [attribute 2] only if attribute 1 is day
date time picker + month [attribute 2] only if attribute 1 is month

I don’t know what you mean bye attribute, but send a screenshot of the actions if you like.

Yes it’s working! Attributes are extra value types you can create for option sets. Works great!

Schermafbeelding 2020-11-06 om 07.08.50

Ohh, okay, nice.

Now you can click on solve post :grinning: :computer:

I don’t see that. Do I miss something?

Ohh, nothing. You just clicked on the solution. That’s it :+1:t3:

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.