Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita9ec209

Browse files
committed
Merge branch '2.0' into 2.1
2 parentsc488fcc +0b0164f commita9ec209

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

‎reference/forms/types/repeated.rst‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,44 @@ the actual type of the two underlying fields. The ``options`` option is passed
5252
to each of those individual fields, meaning - in this example - any option
5353
supported by the ``password`` type can be passed in this array.
5454

55+
Rendering
56+
~~~~~~~~~
57+
58+
The repeated field type is actually two underlying fields, which you can
59+
render all at once, or individually. To render all at once, use something
60+
like:
61+
62+
..configuration-block::
63+
64+
..code-block::jinja
65+
66+
{{ form_row(form.password) }}
67+
68+
..code-block::php
69+
70+
<?php echo $view['form']->row($form['password']) ?>
71+
72+
To render each field individually, use something like this:
73+
74+
..configuration-block::
75+
76+
..code-block::jinja
77+
78+
{{ form_errors(form.password) }}
79+
{{ form_row(form.password.first) }}
80+
{{ form_row(form.password.second) }}
81+
82+
..code-block::php
83+
84+
<?php echo $view['form']->errors($form['password']) ?>
85+
<?php echo $view['form']->row($form['password']['first']) ?>
86+
<?php echo $view['form']->row($form['password']['second']) ?>
87+
88+
..note::
89+
90+
The sub-field names are ``first`` and ``second`` by default, but can
91+
be controlled via the `first_name`_ and `second_name`_ options.
92+
5593
Validation
5694
~~~~~~~~~~
5795

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp