close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Form builder creates such complicated code

Thread began 3/02/2010 12:10 am by gwh362692 | Last modified 3/04/2010 3:42 am by gwh362692 | 2979 views | 9 replies

gwh362692

Form builder creates such complicated code

Hi everyone,

I wanted to insert just a simple form onto my home page, consisting of just a First Name, Last Name and Email field, plus a submit button. I used CSS form builder to insert it but it created so much code, ie. all these divs which complicate my code. I just wondered why this extension has to create such div-heavy code? Also, I inserted it into a div that already existed in my layout, ie. within my sidebar div and the form just spilled right out of it, clashing with all my other code.

Is it possible to just create my own simple form and then have form builder create the validation? I just didn't want to go to the trouble of doing this if the code ends up being the same as that below, once I bring it into form builder.

Appreciate any advice.



<form class="NewFromBlank_Default" id="NewsletterRegistration_NewFromBlank_Default" name="NewsletterRegistration_NewFromBlank_Default" method="post" action="index.php">
<!--
WebAssist CSS Form Builder - Form v1
CC: Registration
CP: Newsletter Registration
TC: <New From Blank>
TP: Default
-->
<ul class="NewFromBlank_Default">
<li>
<fieldset class="NewFromBlank_Default" id="fieldset">
<legend class="groupHeader"></legend>
<ul class="formList">
<li class="formItem">
<div class="formGroup">
<div class="lineGroup">
<div class="fullColumnGroup">
<label for="fieldset_group_First_Name" class="sublabel" > First Name<span class="requiredIndicator">&nbsp;*</span></label>
<div class="errorGroup">
<div class="fieldPair">
<div class="fieldGroup"> <span id="fieldset_group_First_Name_Spry">
<input id="fieldset_group_First_Name" name="fieldset_group_First_Name" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("index","fieldset_group_First_Name"):"")); ?>" class="formTextfield_Large" tabindex="1" onblur="hideServerError('fieldset_group_First_Name_ServerError');"/>
<span class="textfieldRequiredMsg">Please enter your first name</span> </span>
<?php
if (ValidatedField('index','index')) {
if ((strpos((",".ValidatedField("index","index").","), "," . "1" . ",") !== false || "1" == "")) {
if (!(false)) {
?>
<span class="serverInvalidState" id="fieldset_group_First_Name_ServerError">Please enter your first name</span>
<?php //WAFV_Conditional index.php index(1:)
}
}
}?>
</div>
</div>
</div>
</div>
</div>
<div class="lineGroup">
<div class="fullColumnGroup">
<label for="fieldset_group_Last_Name" class="sublabel" > Last Name<span class="requiredIndicator">&nbsp;*</span></label>
<div class="errorGroup">
<div class="fieldPair">
<div class="fieldGroup"> <span id="fieldset_group_Last_Name_Spry">
<input id="fieldset_group_Last_Name" name="fieldset_group_Last_Name" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("index","fieldset_group_Last_Name"):"")); ?>" class="formTextfield_Large" tabindex="2" onblur="hideServerError('fieldset_group_Last_Name_ServerError');"/>
<span class="textfieldRequiredMsg">Please enter your last name</span> </span>
<?php
if (ValidatedField('index','index')) {
if ((strpos((",".ValidatedField("index","index").","), "," . "2" . ",") !== false || "2" == "")) {
if (!(false)) {
?>
<span class="serverInvalidState" id="fieldset_group_Last_Name_ServerError">Please enter your last name</span>
<?php //WAFV_Conditional index.php index(2:)
}
}
}?>
</div>
</div>
</div>
</div>
</div>
</div>
</li>
<li class="formItem">
<div class="formGroup">
<div class="lineGroup">
<div class="fullColumnGroup">
<label for="fieldset_group_Email" class="sublabel" > Email<span class="requiredIndicator">&nbsp;*</span></label>
<div class="errorGroup">
<div class="fieldPair">
<div class="fieldGroup"> <span id="fieldset_group_Email_Spry">
<input id="fieldset_group_Email" name="fieldset_group_Email" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("index","fieldset_group_Email"):"")); ?>" class="formTextfield_Large" tabindex="3" onblur="hideServerError('fieldset_group_Email_ServerError');"/>
<span class="textfieldInvalidFormatMsg">Invalid format.</span><span class="textfieldRequiredMsg">Please enter your email address</span> </span>
<?php
if (ValidatedField('index','index')) {
if ((strpos((",".ValidatedField("index","index").","), "," . "3" . ",") !== false || "3" == "")) {
if (!(false)) {
?>
<span class="serverInvalidState" id="fieldset_group_Email_ServerError">Please enter your email address</span>
<?php //WAFV_Conditional index.php index(3:)
}
}
}?>
</div>
</div>
</div>
</div>
</div>
</div>
</li>
<li class="formItem"> <span class="buttonFieldGroup" >
<input class="formButton" name="NewsletterRegistration_submit" type="submit" id="NewsletterRegistration_submit" value="Submit" onclick="clearAllServerErrors('NewsletterRegistration_NewFromBlank_Default')" tabindex="3" />
</span> </li>
</ul>
</fieldset>
</li>
</ul>
</form>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...