Community

Hi there, I have a neartail form and I am trying to add a certain feature but cannot figure out how. I am trying to automatically add a surcharge if someone selects delivery outside of a certain time range (I.I before 9am and after 5pm). Do you have an idea of how I might implement something like this to my form?

Em-Jae Lam

Jun 27, 2024

Comments (1)

Vipin

Jun 27, 2024

Hi Em-Jae, would you like to charge a surcharge based on the answer for the "Drop-off Timeslot" date and time question? Please follow the instructions below to add the calculations in your form. Delivery surcharge Login to Neartail > click on the form to open it > Edit page will be displayed >In the Neartail Edit page, click on the Add price field icon > select Delivery fee, click Next > select Custom calculation, click Next > Enter the below formula and click Create. IFS(Drop-off Timeslot.getHour() >= 9 && Drop-off Timeslot.getHour() < 17, 0, 10) getHour() returns the hour of a date. If the user selects 27/04/2024 10:30 AM for the "Drop-off Timeslot" field, then Drop-off Timeslot.getHour() will return 10. We can use the IFS function to check if the hour is between 9am and 5pm, and set the surcharge fee. Calculate total amount including surcharge fee In the Neartail Edit page, click on the Add price field button > select Net amount, click Next > select Standard calculation using NETTOTAL() formula, click Next > click Create. Please try this and confirm.

Add your comment