Closed (fixed)
Project:
Clientside Validation
Version:
7.x-1.31
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 May 2012 at 11:33 UTC
Updated:
18 Jan 2019 at 20:33 UTC
Jump to comment: Most recent
Comments
Comment #1
jelle_sCan you be more specific? I just tested with the latest dev version and a single on/off checkbox that is required works for forms built with the Form API, for fields on entities and for webforms...
What exactly isn't working for you?
Comment #3
jelle_sSpammer... has been reported
Comment #4
ramsegal commentedSpammer? huh?
I had to add a require rule with hook_validation_fapi_validation_rules, if i use only '#required'=>TRUE to the field, it's only been validated server side..
Thanks anyways.
Comment #5
jelle_sSorry, that wasn't about you, if you look closely, comment #2 is deleted, because the spammer account was deleted ;-)
If you get the latest dev version from git, it should work only setting '#required' => TRUE
Comment #6
attiks commentedOn what form did you have this: custom form, user registration form, ... Any other modules you used?
Comment #7
ramsegal commentedHi, thanks for supporting!
It happens to me on a custom form, the field code:
For this code, i can submit the form, no clientside validation.
I added a custom rule with hook_validation_fapi_validation_rules, and used fapi (#rules => ...), so on submit the checkbox is validated, however no message to the user...
I am still struggling with this, i don't want to update to the latest dev version because i want to keep the inline error messages (and one error message at a time)
Thanks!
Comment #8
attiks commentedI tried this using the following and it works (latest dev version), any javascript errors? What does Drupal.settings.clientsideValidation look like when you view the source of the page?
Comment #9
attiks commentedComment #10
ak commentedHi, I am using this on a simple node form. I got the same problem with the 7.x-1.31 release. It's only validating textfields and texareas but no error messages for checkbox or select dropdowns.
I tried using the current dev version as mentioned but that gives me a php error with my hierarchical select taxonomy field:
(Notice: Undefined index: field_country[und] in clientside_validation_regular() (line 172 of … /clientside_validation_form.module))
A lot has hanged in the current dev version. Is there a simple fix or patch to this issue for the 7.x-1.31 release?
Thank's for advice.
Comment #11
attiks commentedWhat version of Drupal are you using?
Comment #12
ak commentedMy site is running Drupal 7.12. Is the Drupal version related?
Comment #13
attiks commentedDo you get any javascript errors?
Can you post the content of Drupal.settings.clientside_validation?
Is this is a single checkbox or multiple?
Post a screenshot if you can
Comment #14
ramsegal commentedI installed the latest dev version (22-05-12), no luck, required checkbox isnt being validated.
Comment #15
attiks commented@ramsegal, what's the difference between your form and the one in #8
Comment #16
ramsegal commentedi have some more fields, one special - captcha.
other than that...same.
Comment #17
jelle_sI just tested with this (very basic) form and the checkbox got validated:
@ramsegal:
What do your js settings look like? Could you post it here?
Comment #18
ak commentedI am now going with the dev version of this module.
I can confirm that is does validate my checkbox and my node reference select box as expected.
In response to #13 and version 7.x-1.31:
– No Javascript errors occur.
– It's a single checkbox, a taxonomy term- and node reference-select box.
– Btw. I got jquery_update module installed with jquery 1.5.x.
– Here's some settings code, the checkbox as example appears:
Comment #19
attiks commentedjquery_update might be the problem, but not sure
Comment #20
jelle_sjust tested the form from #17 again with jquery update enabled (jquery-1.5.2) and everything still worked as it should...
Comment #21
jelle_s@ak: can you post a screenshot of your fields (so I can see the type & widget) so I can try to reproduce?
Comment #22
ak commentedThe dev version fixed the problem for me. Checkboxes and selects validate fine with dev, so I'm sticking with that. I would recommend to make a new full releas version asap that fixes this bug for all users. Best regards.
Comment #23
attiks commentedComment #25
ramsegal commentedI found the problems i had:
1. select - i use the module selectmenu, which breaks the clientside validation.
2. checkbox - i have a multistep form, which i didnt implement right. the checkbox is in the second step. because i called the form builder function directly, the validation was on the first step elements, once i changed it to drupal_get_form everything works as expected.
So nothing related to clientside validation module..
Thanks for the support
Comment #26
pyxio commentedI have the same problem with a single on/off boolean checkbox on user register form. If i check the field settings i see the Exclude from clientside validation option and it is unchecked. If I check source code there is no validation error label being created for this specific form element. I am using module version 7.x-1.44
Comment #27
asamant6 commentedRecently I have faced one issue due to use of clientside_validation module (v1.46).
Issue :: If user submits a form without filling any data, error list will be shown as expected. After this if user selects first mandatory checkbox (first input also) , all errors will hide from the error list at a glance. Again if user unchecks the checkbox, only one error related to this checkbox will be shown. All errors can be shown again if user is trying to submit the form without filling it. This issue happens when we are going to display the error list on the top of any form and the first element is mandatory checkbox.
I haven't found any patch for this issue. For now I have fixed this issue using custom implementation where form validator has been triggered manually. I will try to post one patch here if possible.
Please reopen this issue.
Comment #28
gobinathmReopening as requested by asamant6 in chat.