问题
How can i achieve the following using cakephp form helper
<input type="text" required>
回答1:
$this->Form->input('foo', array('required' => 'required'));
This will set the required
attribute in longhand required="required"
format, but will have the same effect.
来源:https://stackoverflow.com/questions/5428814/cakephp-form-helper