Page 1 of 1

[SOLVED] Hidden fields added by the FormBuilder module

Posted: Wed Jun 18, 2008 8:12 am
by tomgsd
Hi all,

I'm having a bit of a problem with three hidden fields added by the formbuilder module.  Have a look at the code for my form below:

Code: Select all

<form id="m3moduleform_1" method="post" action="index.php" enctype="multipart/form-data">
   
   <div class="hidden">
      <input type="hidden" name="mact" value="FormBuilder,m3,default,0" />
      <input type="hidden" name="m3returnid" value="15" />
   </div>


   <!-- THE OFFENDING FIELDS! -->
   <input type="hidden" name="m3form_id" value="3" />
   <input type="hidden" name="m3fbrp_continue" value="2" />
   <input type="hidden" name="m3fbrp_done" value="1" />


   <div>
      <label for="m3fbrp__21" class="form_label">Your Name:</label>
      <div class="textboxbg">
         <input type="text" name="m3fbrp__21" id="m3fbrp__21" value="" size="25" maxlength="80" />
      </div>
      <label for="m3fbrp__22" class="form_label">Your E-Mail:</label>
      <div class="required textboxbg">
         <input type="text" name="m3fbrp__22" id="m3fbrp__22" value="" size="25" maxlength="80" />
      </div>
      <label for="m3fbrp__23" class="form_label">Comments:</label>
      <div class="required textareabg">
         <textarea name="m3fbrp__23" cols="8" rows="6" id="m3fbrp__23"></textarea>
      </div>
      <div class="submit">
         <input name="m3fbrp_submit" value="Submit" type="submit" class="fbsubmit" id="fbsubmit" />
      </div>
   </div>

</form>

My problem here is that I am aiming to make the site 100% valid XHTML Strict and the three 'offending fields' above are the last things that are breaking this (they need to be wrapped in a div like the ones above them).

I was wondering if there was anyway to move them into the div (class="hidden") above them or at least surround them in a new one?

For reference, I'm using (if you need any other info just let me know):
   FormBuilder 0.4.4
   CMS Made Simple 1.2.4 (need to upgrade once this is sorted!)

Any help on this would be greatly appreciated.

Thanks in advance.

Tom

Re: Hidden fields added by the FormBuilder module

Posted: Thu Jun 19, 2008 4:32 pm
by calguy1000
doesn't wrapping the entire form inside a div (which is done by default) solve this problem?

Re: Hidden fields added by the FormBuilder module

Posted: Thu Jun 19, 2008 4:39 pm
by sjg
Or edit the form template through the FB admin.

Find the section that looks like:

Code: Select all

	{* and now the form itself *}
	{$fb_form_start}
	{$fb_hidden}
and change it to

Code: Select all

	{* and now the form itself *}
	{$fb_form_start}
	<div>{$fb_hidden}</div>

This has been fixed in the svn version.

___Samuel___

[SOLVED] Hidden fields added by the FormBuilder module

Posted: Thu Jun 19, 2008 8:36 pm
by tomgsd
Wrapping the whole thing in a div doesn't do it.  Its already in one outside the tags - i just didn't include it in the sample.

The tags round {$fb_hidden} worked perfectly though - so simple, can't believe I didn't see that one!

Cheers for that guys.

Tom