Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
217 views
in Q2A Core by
Is there a simple way to make a hidden field when adding fields to a form array in Q2A? I see there is a 'type' part of the forms array, but when I set that to 'hidden' nothing happens. The type element seems to only take a 'text' or 'static' value.
Q2A version: 1.5

1 Answer

+1 vote
by

add them to $form['hidden']:

$form['hidden']['foo'] = 'bar';

the key is the name tag, and the value is the value tag, as per qa-theme-base.php:

        function form_hidden($form)
        {
            if (!empty($form['hidden']))
                foreach ($form['hidden'] as $name => $value)
                    $this->output('<INPUT TYPE="hidden" NAME="'.$name.'" VALUE="'.$value.'"/>');
        }

...