User login

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

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.