Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
in Q2A Core by
There is a FORM element created using arrays*, I get this output:

<FORM id="qa-user-history-main">
    <TABLE CLASS="qa-form-wide-table">
        <TR> ...

Now I want to give the first <TR> element (and others that I pick!) a css class name, how do I do it?


*The form is created by:

        return array(                
            'style' => 'wide',
            'title' => qa_opt('user_act_list_title'),
            'fields'=> $fields,
            'tags' => 'id="qa-user-history-main"',

see qa-history-layer.php → https://github.com/NoahY/q2a-history/blob/master/qa-history-layer.php

1 Answer

+2 votes
selected by
Best answer

Look in the code in qa-theme-base.php that outputs form elements, and you'll see what's available and how to control it.

Wonderful, finally I have an idea where to look them up. That information I was missing for 1 year.

I found $field['id'] to specifiy an ID for the <TR> element, however, there is no CLASS element to be set.

Thanks anyways, Gideon!
Is psedo class(:first-child) not useful? Is there special reason?
Nope, I have to change different rows (TR), not only the first one. The order is always changing.