[feature request] Form field placeholder accessors
jdoubleu opened this issue · 1 comments
jdoubleu commented
Maybe add a placeholder property or its accessor methods to the Form's Field
class.
Example:
$form->text('email')
->setLabel("Email")
->setPlaceholder("john@example.com");
Right now, one has to use:
$form->text('email')->setAttribute('placeholder', 'john@example.com');
Please note, that the placeholder
attribute is only supported on certain input types (see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input#attributes).