Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
1.2k views
in Q2A Core by

I need to add a third CSS class to my button.

I tried creating a button with:

                        $this->content['q_view']['form']['buttons']['mycustombtn'] = array(
                            'tags' => 'class="my-custom-class',
                            'label' => 'stuff here'
                        );

but the result is that the class attribute appears twice in the output:

Like:

<input class="my-custom-class" ... type="submit" class="qa-form-light-button qa-form-light-button-mycustombtn" />

Don't tell me I have to declare the class name with the name of the array?!

Thanks for your tips :)

1 Answer

+1 vote
by
Don't tell me I have to declare the class name with the name of the array?!

I'd like to answer that but you aren't allowing me to do so :) More info here: http://goo.gl/eLzLJT

by
wow, hadn't thought that this is the way to go. I wished I could specify that in the array: 'class' => 'mycustomclass'
or at least only in the 'tags'. But nope, set by the core...

You are allowed to reply ;-)
...