diff --git a/book/zend.form.collections.md b/book/zend.form.collections.md index e4bc006b..903c50a9 100644 --- a/book/zend.form.collections.md +++ b/book/zend.form.collections.md @@ -419,14 +419,14 @@ entity. This element has a few interesting options: -- `count`: this is how many times the element (in this case a category) has to be rendered. We've +* `count`: this is how many times the element (in this case a category) has to be rendered. We've set it to two in this examples. -- `should_create_template`: if set to `true`, it will generate a template markup in a `` +* `should_create_template`: if set to `true`, it will generate a template markup in a `` element, in order to simplify adding new element on the fly (we will speak about this one later). -- `allow_add`: if set to `true` (which is the default), dynamically added elements will be retrieved +* `allow_add`: if set to `true` (which is the default), dynamically added elements will be retrieved and validated; otherwise, they will be completely ignored. This, of course, depends on what you want to do. -- `target_element`: this is either an element or, as this is the case in this example, an array that +* `target_element`: this is either an element or, as this is the case in this example, an array that describes the element or fieldset that will be used in the collection. In this case, the `target_element` is a `Category` fieldset. @@ -550,10 +550,10 @@ echo $this->form()->closeTag(); A few new things here : -- the `prepare()` method. You *must* call it prior to rendering anything in the view (this function +* the `prepare()` method. You *must* call it prior to rendering anything in the view (this function is only meant to be called in views, not in controllers). -- the `FormRow` helper renders a label (if present), the input itself, and errors. -- the `FormCollection` helper will iterate through every element in the collection, and render every +* the `FormRow` helper renders a label (if present), the input itself, and errors. +* the `FormCollection` helper will iterate through every element in the collection, and render every element with the FormRow helper (you may specify an alternate helper if desired, using the `setElementHelper()` method on that `FormCollection` helper instance). If you need more control about the way you render your forms, you can iterate through the elements in the collection, and @@ -629,7 +629,7 @@ The `add_category` function is fairly simple: Here is the code: -```php +```javascript