Repeated
Repeated type field is basically same field doubled, with a name change.
Used mostly for password confirmations:
<?php
$this->add('password', 'repeated', [
'type' => 'password'
'second_name' => 'password_confirmation',
'first_options' => [],
'second_options' => [],
])
Generates html:
<div class="form-group">
<label for="password">Password</label>
<input type="password" name="password">
</div>
<div class="form-group">
<label for="password">Password Confirmation</label>
<input type="password" name="password_confirmation">
</div>
Beside inherited, there are some additional options available:
type(String) (Default:password) - Field type to be usedsecond_name(String) (Default:{FIELD_NAME}_confirmation) - Name of the second field, if empty, uses the default name with_confirmationappended.first_options(Array) (Default:[]) - Options for the first fieldsecond_options(Array) (Default:[]) - Options for the second field