If you have a module which adds a checkbox via hook_form_alter, you have to make sure that Checkbox Validate has a heavier weight in the system table, or its modifications do not apply.

Might be worth adding some code to the .install to give it a heavier weight by default, but mostly I wanted to make a note of it in case somebody else was struggling.

Comments

robert castelo’s picture

Assigned: Unassigned » robert castelo

Good point.

I'm tempted to move the form changes into an after_build function, but that would make it difficult for other modules to alter the form to make a checkbox optional (for whatever reason), your suggestion of adjusting the system table is more flexible.

sun’s picture

Status: Active » Closed (duplicate)

Thanks for taking the time to report this issue.

However, marking as duplicate of #425096: Properly use Form API. Changing module weights or anything related is not even remotely required when properly integrating with Form API.

You can follow up on that issue to track its status instead. If any information from this issue is missing in the other issue, please make sure you provide it over there.