Thanks for this great little module. Just what I needed for a particular usecase.

One suggestion on the UI side: allow the developer to specify the CSS class name for the HTML button. Currently this is hard-coded as "button_field", however, from a UI design point of view, I think one would want these buttons to look and feel like all the other buttons on the website. This can be relatively easily achieved by going into existing (and future) CSS files and adding " .button_field" wherever something like ".form-submit" occurs. However, this could be more easily achieved by simply specifying the CSS class of the button field? Another option, which is what I have done temporarily, is to edit button_field.rules.inc - not best practice I know, but easier than editing all our CSS files. This would also open up the opportunity of having different coloured buttons for different usecases, and sort forth...

Maybe even have a higher level option of specifying the default CSS class name (part of the configuration of the module settings?), with the option to change it on a per-field basis?

I would contribute a patch if I had the time and know-how - alas I have neither!

Thanks again, and keep up the excellent work.

Comments

BassistJimmyJam’s picture

Assigned: Unassigned » BassistJimmyJam

This is an interesting idea. I think the button_field class needs to stay (to keep the JavaScript functionality clean and efficient). However, I will add an option to the field configuration page to add an additional class name. I will add this to be included in the first beta release.

BassistJimmyJam’s picture

Title: Allow developer to specify the CSS class name for the HTML button? » Optional class for elements
Status: Active » Fixed

This change has been checked in and the first beta release has been created.

Thanks,
BassistJimmyJam

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit aa241c0 on 6.x-1.x, 8.x-1.x by BassistJimmyJam:
    #739768 by GlossyIbis: Added an additional class option to both the html...