Some themes use buttons as span tags themed with css. It would be nice if this module allowed the user to insert HTML tags in order to define its custom button, so the button from this module could comply with the other buttons on the site.

So I've created this patch to allow a third category of button, called "custom button", the button itself is a span tag with the id, class and name like the buttons from this module, in addition, the user can specify prefix and suffix HTML tags to insert, respectively, before and after the span button.

For example, the theme I use codes a button like this:

<a href="/node/79" class="Button"><span class="btn"><span class="l"></span><span class="r"></span><span class="t">Button Text</span></span></a>

So, when creating my custom button with the patch, I define:

Prefix:

<a href="" class="Button"><span class="btn"><span class="l"></span><span class="r"></span><span class="t">

Suffix:

</span></span></a>

And the custom button is inserted in the middle of that, allowing this button to have the same look as the others from the website.

CommentFileSizeAuthor
button_field.patch5.99 KBrmanola

Comments

rmanola’s picture

So, is there a chance of this being accepted on this project?

BassistJimmyJam’s picture

Status: Patch (to be ported) » Needs work

I'm not sure that this is the best way to handle this. I will think this over and see about adding it as a new feature.

BassistJimmyJam’s picture

Category: task » feature
Status: Needs work » Closed (fixed)

I have decided not to add this to the button field module. If you would like to add a new contrib module that adds a custom button widget you are free to do so.