Add attributes to input
Created 7 years ago by luisfsdUsing something like this:
{% set form = form('login').redirect(request_get('redirect')).get() %} {{ form.open|raw }} {{ form.fields.email.input|raw }} {{ form.close|raw }}
How can I add a placeholder to the email.input field?
Thanks.
khanhnguyen
—
7 years ago
To supplement. ^^
A hash key must be followed by a colon (😄
{{ form.fields.email.setAttributes({ 'key' : 'value', 'moar':'values', })|raw }}
It might be cleaner to simply use the
input_name
like this:But you could also probably do something like this: