Forums

Create forms without the wizard?

Grover002 02 Aug, 2010
HI there,

I am about to build a vast set of (some long) forms for one of my sites. Using the Form Wizard this is going to be time consuming. As I assume the result of the Form Wizard is stored in some tables, I imagine there is a faster way to build forms. Is there a way to build forms without using the wizard?

Cheers,
Bas
GreyHead 02 Aug, 2010
Hi Bas,

You can code HTML (and PHP) directly into the Form HTML box in the Form Editor. This means that you can create the code in pretty much any HTML coding tool like Dreamweaver. You can also use PHP there so it's possible to write PHP functions to create repetitive code. There is a library of functions like this in the Plugin Helper files that let you create e.g. a fully configured text input with
$tooltip = "Your ReCaptcha private key.";
$input = $helper->createInputTD("ReCaptcha private key", 'params[private_key]',
  $params->get('private_key'), '', $attribs['input'], $tooltip);
echo $helper->wrapTR($input, array('class' => 'cf_config'));
This creates the following form HTML
<tr class="cf_config" >
  <td class="cf_tooltip" ><span class="editlinktip hasTip" title="Your ReCaptcha public key." style="text-decoration: none; color: #333;"><img src="/joomla1.5h/includes/js/ThemeOffice/tooltip.png" border="0" alt="Tooltip"/></span></td>
  <td class="key" >ReCaptcha public key</td>
  <td class='cf_spacer' > </td>
  <td  ><input type='text' name='params[public_key]' id='paramspublic_key' maxlength="150" size="80" class="text_area" value='6LfNoAUAAAAAAKi8QZmjv-QHOvlGtyh509SG3FzG' /></td>
</tr>


Bob
Grover002 02 Aug, 2010
Thanks, and I understand that if I choose to hard-code the forms in php/html, it means I cannot alter anything by means of the wizard afterwards. (as it says it overwrites HTML in the form editor)

Thanks for now,
Bas
GreyHead 02 Aug, 2010
Hi Bas,

Yes that's correct.

Bob
This topic is locked and no more replies can be posted.