[SOLVED] Hidden fields added by the FormBuilder module

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
tomgsd
Forum Members
Forum Members
Posts: 74
Joined: Tue Feb 12, 2008 10:00 am

[SOLVED] Hidden fields added by the FormBuilder module

Post 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
Last edited by tomgsd on Thu Jun 19, 2008 8:38 pm, edited 1 time in total.
Green Sheep Design Ltd. - www.greensheep.co.uk
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Hidden fields added by the FormBuilder module

Post by calguy1000 »

doesn't wrapping the entire form inside a div (which is done by default) solve this problem?
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
sjg
Power Poster
Power Poster
Posts: 310
Joined: Thu Jan 27, 2005 5:11 pm

Re: Hidden fields added by the FormBuilder module

Post 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___
Many modules available from the http://dev.cmsmadesimple.org
The CMS Made Simple Developer Cookbook is now available from Packt Publishers!
tomgsd
Forum Members
Forum Members
Posts: 74
Joined: Tue Feb 12, 2008 10:00 am

[SOLVED] Hidden fields added by the FormBuilder module

Post 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
Green Sheep Design Ltd. - www.greensheep.co.uk
Post Reply

Return to “CMSMS Core”