Hi, thank you for providing a such great module.
I created a module to always display terms and conditions checkbox before user submiting content. I did this by using a form_alter to create a checkbox, utilized the code from legal module. it's something look like this:
if(user_access('no terms and conditions for contents') && function_exists('legal_get_conditions')) {
$conditions = legal_get_conditions();
if (empty($conditions['conditions'])) return;
$form_fields = legal_display_fields($conditions);
$form += theme('legal_display', $form_fields);
}
However I found that my module is always loaded before checkbox_validate. So I made a patch for this.
Also, in the code when using while(list($key,$value) = each($form_items)), the nested 'legal' element isn't processed by the module. So I made a patch for both of the two issues. Please check. Thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| checkbox_validate.patch | 823 bytes | andyhu |
Comments
Comment #1
andyhu commentedSorry I mean my module is always loaded after checkbox_validate, so the form element created isn't altered by checkbox_validate module
Comment #2
andyhu commentedSorry this issue is fixed in version 2.1
Comment #3
andyhu commented