Is it possible - clear input field on focus with CakePHP (as opposed to just writing some js)
I realize this seems like an obvious JS type thing - but I'm new to CakePHP, and just wondering if there's some elegant soluti开发者_JS百科on to clearing a text input when clicking on it.... like maybe an attribute for the field's array 'clearOnFocus'=>'true' or something?
You could use the placeholder feature of HTML5:
$this->Form->input('example', array('placeholder' => 'Your placeholder text'));
精彩评论