Changeset 7588
- Timestamp:
- 02/23/08 14:11:54 (2 years ago)
- Files:
-
- doc/branches/1.0/book/14-Generators.txt (modified) (1 diff)
- doc/branches/1.1/book/14-Generators.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
doc/branches/1.0/book/14-Generators.txt
r7424 r7588 926 926 927 927 // Resulting HTML 928 <input type="text" name="article[title]" id="article [title]" value="My Title" />928 <input type="text" name="article[title]" id="article_title" value="My Title" /> 929 929 930 930 This has plenty of advantages during the internal form-handling process. However, as explained in Chapter 10, it makes the form validation configuration a bit trickier, so you have to change square brackets, `[` `]`, to curly braces, `{` `}`, in the `fields` definition. Also, when using a field name as a parameter for a validator, you should use the name as it appears in the generated HTML code (that is, with the square brackets, but between quotes). Refer to Listing 14-36 for a detail of the special validator syntax for generated forms. doc/branches/1.1/book/14-Generators.txt
r7424 r7588 926 926 927 927 // Resulting HTML 928 <input type="text" name="article[title]" id="article [title]" value="My Title" />928 <input type="text" name="article[title]" id="article_title" value="My Title" /> 929 929 930 930 This has plenty of advantages during the internal form-handling process. However, as explained in Chapter 10, it makes the form validation configuration a bit trickier, so you have to change square brackets, `[` `]`, to curly braces, `{` `}`, in the `fields` definition. Also, when using a field name as a parameter for a validator, you should use the name as it appears in the generated HTML code (that is, with the square brackets, but between quotes). Refer to Listing 14-36 for a detail of the special validator syntax for generated forms.

