Skip Navigation

[Resolved] Generic checkbox for confirmation not validating even when checked

This support ticket is created 4 years, 4 months 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 4 years, 4 months ago.

Assisted by: Christian Cox.

Author
Posts
#1405515

Following on from this thread (https://toolset.com/forums/topic/what-is-the-best-approach-in-adding-a-i-confirm-checkbox-to-a-crud-form/) I only later realised that even when my confirmation checkbox is checked the form still won't submit.

So I simply need a checkbox which must be ticked in order for the form to be submitted and so added a generic field as per the support guidance, however even when the box is checked the form still won't submit and the errors says that this field is required? My code is:

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

Am I missing something?

#1407119

Hi, try adding a value to the generic checkbox field. Without a value, the system may not interpret it as being checked:

[cred_generic_field type='checkbox' field='gdpr-confirmation']
{
"required":0,
 "value":1,
"default":"",
"label":"I confirm I am happy for the details provided above to be shared with all broker members of the site."
}
[/cred_generic_field]
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.