thehaven Posted November 18, 2023 Posted November 18, 2023 I spent the better part of my weekend trying to find the code needed to require my Date of Birth field, which is a datepicker, to be a date that is age 18 or older. I even went to chatgpt and it printed me out some nice code but alas, it did not work. Is this even possible? I read you can add some javascript in either an html code box or inject it into the header/footer to make this happen. Might anyone be able to help me on this? https://www.thehavensrq.org/residential-wait-list Thank you, Bruno Beyondspace 1
Beyondspace Posted May 22 Posted May 22 On 11/18/2023 at 1:15 PM, thehaven said: I spent the better part of my weekend trying to find the code needed to require my Date of Birth field, which is a datepicker, to be a date that is age 18 or older. I even went to chatgpt and it printed me out some nice code but alas, it did not work. Is this even possible? I read you can add some javascript in either an html code box or inject it into the header/footer to make this happen. Might anyone be able to help me on this? https://www.thehavensrq.org/residential-wait-list Thank you, Bruno Hi Bruno, You mean to block the past dates by 18 years ago right? BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
thehaven Posted May 28 Author Posted May 28 I meant like it would fail authentication unless the date indicated the user was age 18 or older. If I block out dates the user may think the form is malfunctioning. I'd rather them insert their real date of birth and receive a "You must be 18 years of age" message if the date is too recent.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment