-
prowebsol1Asked on April 11, 2025 at 12:27 AM
Hi JotForm Support Team,
I’m currently using the Appointment field in my form and would like to apply conditional logic based on the time selected by the user, regardless of the date.
Specifically, I want to increase the charges or show a different message if the user selects a time after 5:00 PM. However, I couldn’t find a direct way to apply a condition based on time alone (without including the date).
Is there a way to extract just the time portion from the Appointment field, or apply a condition like:
If Appointment time is after 5:00 PM → Increase price / show messageIf this isn't directly possible, could you please suggest any workaround (e.g., using another field, splitting date and time, or using widgets)?
Thank you for your help!
Page URL: https://form.jotform.com/250913292965464 -
Jason JotForm SupportReplied on April 11, 2025 at 3:29 AM
Hi prowebsol1,
Thanks for reaching out to Jotform Support. I understand what you’d like to do, but I’ll need a bit of time to work out a solution. I’ll get back to you shortly.
Thanks for your patience, we appreciate it.
-
Jason JotForm SupportReplied on April 11, 2025 at 3:58 AM
Hi prowebsol1,
I understand that you want to apply conditional logic based on the time selected in the Appointment field, specifically to increase charges or show a message if the time is after 5:00 PM. Currently, the Appointment field does not allow direct extraction of just the time portion for conditional logic. As a workaround, you can simply put a message above the appointment field that if the appointment time selected is after 5:00 pm, then the price will increase. Take a look at my sample below:
This way, your form users will be informed right away before they proceed in booking the time slot. I simply used a paragraph element to put the message above the appointment element.
Give it a try and let us know how it goes.
-
prowebsol1Replied on April 14, 2025 at 6:01 AM
Jason!
Then how is possible i increase the charges after 5:00 PM
give proper solution
i want to charge 50$ before 5:00 PM and 100$ after the 5:00 PM please do this
-
Rene JotForm SupportReplied on April 14, 2025 at 8:58 AM
Hi prowebsol1,
I’ll need a bit of time to look into this. I’ll get back to you as soon as I can.
We appreciate your patience while we work on a solution.
-
Rene JotForm SupportReplied on April 14, 2025 at 4:28 PM
Hi prowebsol1,
To achieve your goal, first we need to add a new field (Short Text element) so the values from the Appointment field can be copied onto it. This will then be used to create a condition later to set a specific pricing when the 5:00 PM slot onwards is selected. Let me show you how:
1. In Form Builder, click on Add Element on the left side of the page.
2. Under the Basic tab, look for Short Text, and then drag and drop it onto the form below the Appointment field.
3. Click on the Gear icon on its right to access its settings.
5. Go to the Advanced tab and toggle Read Only, Shrink, and Hide Field to enable all of them.
1. In Form Builder, using your computer mouse, right-click on the field, Total Cost.
2. From the list of options that'll show up, select Duplicate.
3. Click on the duplicated field, and then click on its Gear icon to access its settings.
4. In the Number Properties window on the right, update the Field Label. In this demo, I named it Total Cost After 5:00 PM.
1. In Form Builder, in the orange navigation bar on top of the page, click on Settings.
2. In the menu on the left, go to Conditions, and then click on Add Condition.
3. Select Update/Calculate Field from the options.
4. Start adding the conditions and once done, click on Save at the bottom of the page.
For the condition to charge form users with $50 if the time slot selected is 4:00 PM or earlier, you can create a similar condition, only that the values will be from 5:00 AM - 4:00 PM, the calculated value is 50, and the field summary is Total Cost. Check out the screenshots below:
If you only need to show the necessary total for a selected time slot, you can show/hide the fields Total Cost and Total Cost After 5:00 PM, depending on the selecting time. That way, form users will only see the necessary information they need to know when filling out your form. Let me show you how:
1. In the Conditions page, click on Add Condition, and then select Show/Hide Field from the list of options.
2. Start adding the values for the condition and once done, click on Save at the bottom of the page.
Check out the preview below:
Give it a try and let us know if you need any other help.
-
prowebsol1Replied on April 15, 2025 at 10:50 PM
Thank you Rene! It work for me, I am very thankful to you
-
prowebsol1Replied on April 15, 2025 at 10:55 PM
Sir i want to clone your form can you give me the access
-
Kris Ann JotForm SupportReplied on April 16, 2025 at 5:21 AM
Hi prowebsol1,
You should be able to clone Rene's form now.
Reach out again if there’s anything else we can do for you.
-
prowebsol1Replied on April 17, 2025 at 1:57 AM
Thank you Kris Ann i have done
Your Answer
Something Went Wrong
An error occurred while generating the AI response. Please try again!