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"> *</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"> *</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"> *</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>