Template optios for possible

Where do I find the docs about all possible template attributes I can change when customizing a form template like in Customizing the Templates FormHelper Uses?

Thanks!

You need to look at the default FormHelper in the cakephp core

1 Like

So what Kevin has given you is the actual HTML element being generated. From there you can use any known attribute which that element accepts and pass it as a parameter in the form create control call.

For instance if your users table has a full_name field which is shown in the add a user template, you can fix the label and add a placeholder on that control: -

<?= $this->Form->control('full_name', ['label' => __('Full Name'), 'placeholder' => __('Firstname Surname')]) ?>

Whatever property the HTML element supports you can put in that 2nd parameter array, like even changing the edit type to password ['type' => 'password'] or clearing the value loaded from the table ['value' => '']

1 Like

Thanks for yours answers! Helped a lot!