Skip to content
Advertisement

CakePHP 3.6: Change submit button label

I tried to change the label of a Submit button with no luck:

<?= $this->Form->button(__('Submit'), array('name' => 'Create')) ?>

How I can change it?

Advertisement

Answer

Just change the text from Submit to Create:

<?= $this->Form->button(__('Create')) ?>

It will generate a button that looks like below:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement