Custom forms – unable to use checkboxes
-
Due to the code in newsletter/subscription/validate.js it is not possible to use checkboxes in custom forms. The function newsletter_check_field insists that all checkboxes must be ticked!
I have modified the code as follows, commenting out lines 3 to 6:
function newsletter_check_field(field, message) { if (!field) return true; // if (field.type == "checkbox" && !field.checked) { // alert(message); // return false; // } if (field.required !== undefined && field.required !== false && field.value == "") { alert(message); return false; } return true; }
but I’m not sure whether this will affect the operation of anything else in the plugin.
Could you please:
- confirm whether my changes will cause problems;
- consider changing your code to allow the use of checkboxes.
Thanks,
Peter
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Custom forms – unable to use checkboxes’ is closed to new replies.