Hi, can you tell me please, why my standard drupal form works with CS module, for example this: http://www.auto-inzeraty.eu/user/register but my custom form NOT? http://www.auto-inzeraty.eu/auto-inzerat-zdarma

Where is any problem?

Comments

Prague man’s picture

Of course, I have this custom content type allowed (enabled) here: http://www.auto-inzeraty.eu/admin/config/validation/clientside_validation/content-types

Prague man’s picture

ok problem is with field group, if I set the group as collapsible or collapsed, CS module doesn't work. If I set group as open, that is worked.

attiks’s picture

Assigned:Unassigned» Jelle_S
Jelle_S’s picture

Component:Miscellaneous» Documentation
Category:task» support
Status:Active» Fixed
StatusFileSize
new4.66 KB
new17.49 KB
new36.46 KB
new4.62 KB
new12.77 KB
new19.06 KB
new19.96 KB

Actually this works as designed, and can be changed by a setting.

Clientside Validation does not validate hidden fields, as we do not know if the user will ever get to see the hidden field (this is to support modules like Webform Conditional)

You can either change this for every form, or only for your custom form:
For every form:

  1. Go to admin/config/validation/clientside_validation.
  2. Click on 'Default Settings'
  3. Scroll down to the 'Hidden fields and tabs' fieldset
  4. Check 'validate hidden fields':
    Selection_027.png

For only one form:
Either follow the same steps as described above and fill in your form id in the textarea:
Selection_028.png

Or follow these steps:

  1. Go to admin/config/validation/clientside_validation.
  2. Click on 'Custom Froms'
  3. Add the right form id:
    Selection_029.png
  4. Click edit next to your form id:
    Selection_030.png
  5. Check 'Override default options for Hidden fields and vertical tabs' and you will see a new fieldset with the settings:
    Selection_031.png
  6. Check 'Validate hidden fields' and save:
    Selection_032.png
  7. Click enable next to your form id and confirm:
    Enable

And you're all set. This way the hidden fields will be validated as well.

PS:

  1. You can do the exact same thing for content types as well:
  2. Go to admin/config/validation/clientside_validation/content-types
  3. Click 'create' next to your content type
  4. Follow the same steps as above starting from 5.
Prague man’s picture

Thank you.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.