I cannot set a custom CSS class for a submit button using code like:
$form['actions']['submit'] = array(
'#attributes' => array(
'class' => array('editablefields-submit'),
),
);
The issue is that my classes are overwritten by alters in form.inc, lines 25-29. There are also some other classes overwritten in that function.
Tested on 7.x-5.0-alpha8, but (based on code review) the issue is also present in latest 5.x dev.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | zurb_foundation-fix_overwritten_attributes_for_submit-2342691-1.patch | 1.36 KB | lklimek |
Comments
Comment #1
lklimek commentedComment #2
shauntyndall commentedComment #4
shauntyndall commented@lklimek I refactored the patch a bit because it didn't apply to the current 5.x-dev HEAD. The "sexy submit button" classes should now cooperate with your code. It certainly is an improvement. Thanks!