Can I force CakePHP's form helper to include a custom attribute?
I need to create a form like this:
<form method="post" promptpermission="email" action="blahblah">
(Note the promptpermission attribute .)
Is there a way to do this without deviating from the helper?
<?php echo $form->create(); ?>
Since this is only one form, I don't want to go very much. Is there a quick and easy way to do this?
+1
a source to share
1 answer
Pretty sure the second argument is an array of options:
<?php echo $form->create(null, array('promptpermission' => 'email')); ?>
Please note that custom attributes are not valid (X) HTML.
+5
a source to share