Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
in Q2A Core by
I have a input and a select in the form and I wanna put a button right after each.

Currently if I add buttons to fields they just appear below input and select on the third raw, how can I display them like I said above?
Q2A version: 1.6.3

1 Answer

+1 vote
selected by
Best answer

Q2A form items are displayed with table tag basically. When you display plural elements in one row, you can use "custom" type field.

Script example: qa-include/qa-page-admin-default.php

Search with 'type' => 'custom'

Thank you for your reply.
I have checked that page out and I can modify it to my page but I still can not change it to what I want.

Basically I want a form with every raw like this:
So I tried this:

$listhtml = '<table class="qa-form-wide-table"><tbody>';
     foreach ($skills as $index => $skillword) {
     // inputs
     $listhtml.='<tr><td class="qa-form-wide-data">
     <input id="input_'.$index.'" name="input_'.$index.'" class="qa-form-wide-text" type="text" value = '.qa_html($skillword).'></input></td></tr>';
     // buttons

     'tags' => 'method="post" action="'.qa_self_html().'" name="edit_skills_form"',
     'title' => 'Edit Skills: ',
     'type' => 'custom',
     'html' => $listhtml,

But I cannot get any output on my page.
Only output is <form>...</form>.
I guess this is not the right way to use "type => 'custom'".
Could you please help me figure out how to make it work?
Thank you so much !
$qa_content['form']['fields']['my-multi-field'] => array(
  'label' => 'My multi field:',
  'style' => 'wide',  // wide:label is displayed in side. tall: label is displayed in top.
  'type' => 'custom',
  'html' => '<input/><button>aaa</button>',
I finally figured this out yesterday.
Now I had another problem which was about qa_clicked() and refreshing the page. Could you please take a look at the question that I have posted below?
Thank you so much