I am trying to add form element to Ask a question page but getting trouble to add element by layer. I have tried to add by layer with three different function but with this not adding element into the form but outside the form.
function form($form)
{
qa_html_theme_base::form($form);
$this->output('Here will be new input element');
}
function form_body($form)
{
qa_html_theme_base::form_body($form);
$this->output('Here will be new input element');
}
function form_buttons($form, $columns)
{
qa_html_theme_base::form_buttons($form, $columns);
$this->output('Here will be new input element');
}
I am also confuse should I have to use temple as below to get only for Ask page? ro there is any different way to do
if ($this->template == 'ask')
$this->output('Here will be new input element');
I am sure some one must have solution for this.
EDIT:-----------------------------------------------------------------------------------
At last got it work and store value to db but now have one trouble. I want this field only on Ask a question page and on edit question form but with $this->template of course its adding all single question page forms.
Need help here is the code
function form_buttons($form, $columns)
{
if(($this->template == 'ask' OR $this->template == 'question') AND qa_get_logged_in_level() > QA_USER_LEVEL_ADMIN):
$this->my_check(); // this is my custom checkbox input code
endif;
qa_html_theme_base::form_buttons($form, $columns);
}