SecureImage::setAttribute
Set an HTML attribute on the field element, mostly an <input> tag.
Some attributes are best set through more specialized methods, to avoid interfering with built-in behaviour: - 'class': - 'title': - 'value': - 'name': CAUTION Doesn't work on most fields which are composed of more than one HTML form field: AjaxUniqueTextField, CheckboxSetField, ComplexTableField, CompositeField, ConfirmedPasswordField, CountryDropdownField, CreditCardField, CurrencyField, DateField, DatetimeField, FieldGroup, GridField, HtmlEditorField, ImageField, ImageFormAction, InlineFormAction, ListBoxField, etc.
Signature
public function setAttribute(
$name,
$value )
Parameters
$name
—$value
—