Skip Navigation

[Resolved] Start and End dates in a toolset form

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Christopher Amirian 2 years ago.

Assisted by: Christopher Amirian.

Author
Posts
#2541963

Tell us what you are trying to do?
I have a form with 2 date fields: start date and end date.
Is there a way to check if the end date is greather than start date? If is not, display a message like "the end date can't be before start date"

Is there any documentation that you are following?
https://toolset.com/forums/topic/conditional-output-related-to-date-fields/
but is not what I need
Is there a similar example that we can see?

What is the link to your site?

#2543701

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

You will need to use the Toolset Forms API Validation Hook and create a custom PHP code for that.

Here is a good example that you can use:

https://toolset.com/forums/topic/custom-form-validation/

Thanks.