Problem:
I need that, on registration page, a user insert his/her birthdate and, only if the user is over 18, is allowed to subscribe himself.
If is under 18 he cannot continue.
I know how to check if the date is validated or not, but i don't know how to pass the value of the field: [cred_field field='data-di-nascita'] to the js code.
Solution:
There isn't such a built-in feature within CRED form, see our document:
https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_field
In the shortcode [cred_field], there isn't such a feature that can achieve what you want:
pass the value of the field: [cred_field field='data-di-nascita'] to the js code
You may consider some custom codes, for example, you can setup your own datapicker with some Jquery UI datepicker, setup the year range as what you want
Relevant Documentation:
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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Hong_Kong (GMT+08:00)
This topic contains 2 replies, has 2 voices.
Last updated by 6 years, 10 months ago.
Assisted by: Luo Yang.