Reputation: 157
Is it possible to create such a form:
<form id="xxx" method="post" action="">
via CakePHP:
echo $this->Form->create('xxx');
?
If it is, please, tell me how.
Upvotes: 0
Views: 1246
Reputation: 8100
echo $this->Form->create(false, ['id' => 'xxx', 'url' => '/' . $this->params['url']['url']]);
should achieve what you need.
Though the question is why do you need action to be empty string? Setting action attribute as empty string would POST the form to current url and by default FormHelper::create() already set the action attribute to current url.
Upvotes: 1