Validating form data using hidden fields

posted by | Leave a comment

Line 572 of date_now reads: //$errors[] = t('The dates are invalid.'); The error that prevented the form submission is now gone, and field validation still takes place for other more normal scenarios.

validating form data using hidden fields-54validating form data using hidden fields-54validating form data using hidden fields-53validating form data using hidden fields-32

No errorrs or warnings as date_hidden_element($element) always returns TRUE.

I ran into this issue and discovered that the cause was that a multi-value field with over 600 entries in the form above my date field was causing $form_state['input'] to have null values and $form_state['values'] to not have any updates. I didn't have time to debug the Drupal Form API and how it populates $form_state, but my workaround was to disable my multi-value field if it has over 100 entries.

That allowed date_combo_validate() to validate my field correctly.

I have rules set up to auto-add a value to each field after saving the node.

It works fine when both fields are visible in the panel, but not when I remove them.

Leave a Reply

njsinglesdating com