Formbuilder Styling

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
senkei
Forum Members
Forum Members
Posts: 10
Joined: Sat Mar 15, 2008 2:36 pm

Formbuilder Styling

Post by senkei »

Hi guys, we just picked up CMSMS recently and it has been a blast to work with. However i am having a bit of a problem with forms (Formbuilder), and just wondering if someone could help me out.

We're using; CMS Made Simple 1.5.1 "San Juan", FormBuilder 0.5.11

So anyways, here is my template, and i'm trying to style a form through Formbuilder to look like the contact form on this template, which is located on the right of the page with Name, Email and Phone fields.

http://www.crosswebdesigns.net/display/2009/vdpw/

Okay here is the code for the contact form in the template.

Code: Select all

<div id="contact"> 
 	<form class="forms" action=""> 
		<p>Your Name</p> 
		<input class="input" type="text"/> 
		<p>Email</p> 
		<input class="input" type="text"/> 
		<p>Phone</p> 
		<input class="input" type="text"/> 
		<div id="contactBottom">
			<input class="button" type="image" src="img/privacyButton.gif"/><input class="button" type="image" src="img/submitButton.gif"/>
		</div> 
	</form> 
</div> 
<!--/contact--> 
Here is our website in action on CMSMS: http://203.98.84.170/~vdpws/

We have setup the required fields, and tested the form and it all works. However i get the feeling the way we went about styling our form, which although on a rendering level looks fine, i don't think it is the correct way of doing. I would like to know how to do it properly for future reference. Basically what we did was rip the output code from the source and slap it in the form template... and whallah. Here is our form template code:

Code: Select all

<div id="contact" >
	<form id="m3moduleform_1" method="post" action="index.php" enctype="multipart/form-data"  class="forms"> 
		<div class="hidden"> 
			<input type="hidden" name="mact" value="FormBuilder,m3,default,0" /> 
			<input type="hidden" name="m3returnid" value="15" /> 
			<input type="hidden" name="m3fbrp_callcount" value="1" /> 
		</div>
		<!--/hidden-->
 		<div>
			<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>
		<!--/div-->
		<p>Your Name</p>
		<input class="input" type="text" name="m3fbrp__17" id="m3fbrp__17" value="" size="25" maxlength="128" onclick="if (this.value=='') {this.value='';}"  /> 
 		<p>Email</p>
		<input class="input" type="text" name="m3fbrp__21" id="m3fbrp__21" value="" size="25" maxlength="128" onclick="if (this.value=='') {this.value='';}"  /> 
 		<p>Phone</p>
		<input  class="input" type="text" name="m3fbrp__19" id="m3fbrp__19" value="" size="25" maxlength="128" onclick="if (this.value=='') {this.value='';}"  /> 
		<div id="contactBottom">
			<input class="button" type="image" src="images/layout/privacyButton.gif"/><input class="button" type="image" src="images/layout/submitButton.gif" name="m3fbrp_submit" id="m3fbrp_submit" />
		</div>
		<!--/contactBottom--> 
	</form> 
</div> 
<!--/contact-->
I tried figuring out the default form templates, but it was way over my head. Anyways with this form, whenever make a change in the template and save it, when we refresh the page for the FIRST time after the change, it would return with this error above the contact form:

Code: Select all

string(143) "Smarty error: [in module_db_tpl:FormBuilder;fb_3 line 16]: syntax error: unrecognized tag: this.value=''; (Smarty_Compiler.class.php, line 446)" string(130)
"Smarty error: [in module_db_tpl:FormBuilder;fb_3 line 16]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(143)
"Smarty error: [in module_db_tpl:FormBuilder;fb_3 line 18]: syntax error: unrecognized tag: this.value=''; (Smarty_Compiler.class.php, line 446)" string(130)
"Smarty error: [in module_db_tpl:FormBuilder;fb_3 line 18]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)" string(143)
"Smarty error: [in module_db_tpl:FormBuilder;fb_3 line 20]: syntax error: unrecognized tag: this.value=''; (Smarty_Compiler.class.php, line 446)" string(130)
"Smarty error: [in module_db_tpl:FormBuilder;fb_3 line 20]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 590)"
But as i said it only happens on the first refresh... if you refresh the page again it is gone, and will not show up until you make another change and save in the form template. So yeh, it would be really nice if someone who has experience in styling Formbuilder templates to come and point out what we did wrong and how we can do it right.

Thanks, Tony
Last edited by tyman00 on Wed Jan 21, 2009 3:22 pm, edited 1 time in total.
Loopy
Forum Members
Forum Members
Posts: 38
Joined: Sat Jun 10, 2006 5:34 pm

Re: Formbuilder Styling

Post by Loopy »

Have a look here:

http://forum.cmsmadesimple.org/index.ph ... #msg141393

its also in the help for form builder.
Post Reply

Return to “Layout and Design (CSS & HTML)”