Skip Navigation

[Resolved] Can't get required checkbox to work

This support ticket is created 5 years ago. There's a good chance that you are reading advice that it now obsolete.

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/Karachi (GMT+05:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by Simon Logan 5 years ago.

Assisted by: Waqar.

Author
Posts
#1443153

Following on from https://toolset.com/forums/topic/generic-checkbox-for-confirmation-not-validating-even-when-checked/ I have tried what Christian suggested, adding a VALUE option to the generic field, however the form still won't submit even if the box is checked now. I've had to set it as not required which allows people to submit without it being checked however we need it to only allow the form to be submitted if it's been checked.

Am I missing something?

#1443907

Hi Simon,

Thank you for contacting us and I'd be happy to assist.

I've tested the slightly updated code for the generic field from your last message and it works as expected:


[cred_generic_field type='checkbox' field='gdpr-confirmation']
{
"required":1,
"default":"1",
"label":"I confirm I am happy for the details provided above to be shared with all broker members of the site."
}
[/cred_generic_field]

Can you please test this and let me know how it goes?

regards,
Waqar

#1444175

Thanks for the clarification, looks like I was needing to set the DEFAULT param rather than the VALUE one previously advised.