File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,44 @@ the actual type of the two underlying fields. The ``options`` option is passed
47
47
to each of those individual fields, meaning - in this example - any option
48
48
supported by the ``password `` type can be passed in this array.
49
49
50
+ Rendering
51
+ ~~~~~~~~~
52
+
53
+ The repeated field type is actually two underlying fields, which you can
54
+ render all at once, or individually. To render all at once, use something
55
+ like:
56
+
57
+ .. configuration-block ::
58
+
59
+ .. code-block :: jinja
60
+
61
+ {{ form_row(form.password) }}
62
+
63
+ .. code-block :: php
64
+
65
+ <?php echo $view['form']->row($form['password']) ?>
66
+
67
+ To render each field individually, use something like this:
68
+
69
+ .. configuration-block ::
70
+
71
+ .. code-block :: jinja
72
+
73
+ {{ form_errors(form.password) }}
74
+ {{ form_row(form.password.first) }}
75
+ {{ form_row(form.password.second) }}
76
+
77
+ .. code-block :: php
78
+
79
+ <?php echo $view['form']->errors($form['password']) ?>
80
+ <?php echo $view['form']->row($form['password']['first']) ?>
81
+ <?php echo $view['form']->row($form['password']['second']) ?>
82
+
83
+ .. note ::
84
+
85
+ The sub-field names are ``first `` and ``second `` by default, but can
86
+ be controlled via the `first_name `_ and `second_name `_ options.
87
+
50
88
Validation
51
89
~~~~~~~~~~
52
90
You can’t perform that action at this time.
0 commit comments