Subform limitations: errors in subform not noted or highlighted the same as main form
Note: Elements of a subform aren't included in the list of 'this is required' if there are main form errors triggered. Furthermore, the wrong element can turn red. In this case, the Title text is red, but it's the group title (renamed Action set name) that's blank.
Title field is required.
Description field is required.
Country field is required.
Province/State field is required.
Town field is required.
Where's the Action set name required?
Well, if you leave only it out you get the error:
Action set name field is required.
Fair enough. But the offending field is not highlighted in red.
Agaric Swelled Head Alert
For important cases, it's worth using the Agaric patented method for full control over forms: make a custom form with the data collection you need for whatever content you are registering, override all submit functions to send to your own custom one, where you can share data between forms and manipulate at will, and then call drupal_execute to re-process the forms-- but you've added a flag to the form values to note that you've already done your processing, so you have an if statement in form_alter that does none of your other form_altering, but simply calls the real submit functions.
Resolution
More like this
- Subform Element does not allow passing of nid information to subsequent forms
- Validation error on search form, contact site admin. But I am the site admin!
- Parse error and other problems with include file- due to bad encoding or something
- Pre-validation of forms with JQuery- alphanumeric check
- Hiding extra submit and preview buttons in subforms


Comments
Post new comment