View Full Version : A value is required
roby258376
06-18-2009, 02:02 PM
I am using the Contact Forum solution pack for the first time. Uploading the files as is, without changing them at all, the validations won't work as intended.
All fields default to "A value is required" instead of putting in the customized text, ie Please provide your email addess so we can get back in touch with you.
any help is appreciate.
Ray Borduin
06-18-2009, 03:11 PM
Do you have a url where we can view the problem?
roby258376
06-19-2009, 03:50 AM
http://www.thoroughwebdesign.com/addressall/ContactForm_GMC/contact_styled.php
thanks
Ray Borduin
06-19-2009, 07:01 AM
It appears the spry validation messages were reset. You can easily update them to whatever you want in the code. Just find the value on the page and update it. If you have CS3 or CS4 you can use the property inspector to manipulate the spry validations entirely.
roby258376
06-19-2009, 07:10 AM
Hi Ray, This is the code from the page.... the validation messages are there, they just aren't being shown on the page.
<form action="" method="post" name="emailContact" id="emailContact" onsubmit="">
<div style="width:100%">
<label for="Contact_Name" >Your name:</label>
<br />
<span id="sprytextfield1">
<input name="Contact_Name" type="text" class="inputValue" id="Contact_Name" onblur="if (document.getElementById('nameServerError')) document.getElementById('nameServerError').style.d isplay='none'" value="<?php echo(ValidatedField("contact","Contact_Name")) ?>" />
<span class="textfieldRequiredMsg">A value is required.</span></span>
<input name="addblock" type="text" id="addblock" style="display:none" value="" />
<?php
if (ValidatedField("contact","contact")) {
if ((strpos((",".ValidatedField("contact","contact").","), "," . "1" . ",") !== false || "1" == "")) {
if (!(false)) {
?>
<span id="nameServerError" class="textfieldServerError">Please provide your name.</span>
<?php //WAFV_Conditional contact.php contact(1:)
}
}
}?>
<br />
<label for="Email_address" >E-mail address:</label>
<br />
<span id="sprytextfield2">
<input name="Email_address" type="text" class="inputValue" id="Email_address" onblur="if (document.getElementById('emailServerError')) document.getElementById('emailServerError').style. display='none'" value="<?php echo(ValidatedField("contact","Email_address")) ?>" />
<span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span>
<input name="seconddblock" id="seconddblock" type="text" style="display:none" value="" />
<?php
if (ValidatedField("contact","contact")) {
if ((strpos((",".ValidatedField("contact","contact").","), "," . "2" . ",") !== false || "2" == "")) {
if (!(false)) {
?>
<span id="emailServerError" class="textfieldServerError">Please provide your email addess so we can get back in touch with you.</span>
<?php //WAFV_Conditional contact.php contact(2:)
}
}
}?>
<br />
<label for="Comments" >Comments:</label>
<br />
<span id="sprytextarea1">
<textarea name="Comments" class="inputText" id="Comments" onblur="if (document.getElementById('commentsServerError')) document.getElementById('commentsServerError').sty le.display='none'" ><?php echo(ValidatedField("contact","Comments")) ?></textarea>
<span class="textareaRequiredMsg">A value is required.</span></span>
<?php
if (ValidatedField("contact","contact")) {
if ((strpos((",".ValidatedField("contact","contact").","), "," . "3" . ",") !== false || "3" == "")) {
if (!(false)) {
?>
<span id="commentsServerError" class="textfieldServerError">Please let us know how we can assist you.<br />
</span>
<?php //WAFV_Conditional contact.php contact(3:)
}
}
}?>
<label for="Security_code" ><br />
Security code:</label>
<br />
<img src="WA_ValidationToolkit/WAVT_CaptchaSecurityImages.php?noisecolor=<?php echo $WAGLOBAL_Captcha_Noise; ?>&bgcolor=<?php echo $WAGLOBAL_Captcha_BG; ?>&textcolor=<?php echo $WAGLOBAL_Captcha_Text; ?>&transparent=<?php echo $WAGLOBAL_Captcha_BG_transparent; ?>&characters=<?php echo $WAGLOBAL_Captcha_Characters; ?>&width=<?php echo $WAGLOBAL_Captcha_Width; ?>&height=<?php echo $WAGLOBAL_Captcha_Height; ?>&font=<?php echo $WAGLOBAL_Captcha_Font; ?>" alt="security code" /><br />
<span id="sprytextfield3">
<input name="Security_code" type="text" class="inputValue" id="Security_code" onblur="if (document.getElementById('captchaServerError')) document.getElementById('captchaServerError').styl e.display='none'" maxlength="40" />
<span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldMinCharsMsg">Minimum number of characters not met.</span><span class="textfieldMaxCharsMsg">Exceeded maximum number of characters.</span></span>
<?php
if (ValidatedField("contact","contact")) {
if ((strpos((",".ValidatedField("contact","contact").","), "," . "4" . ",") !== false || "4" == "")) {
if (!(false)) {
?>
<span id="captchaServerError" class="textfieldServerError">Your security code entry did not match the image.</span>
<?php //WAFV_Conditional contact.php contact(4:)
}
}
}?>
<br />
<label for="Security_code" >
<?php require_once("WA_ValidationToolkit/WAVT_CaptchaSecurityQuestion.php"); ?>
</label>
<br />
<span id="sprytextfield4">
<input name="Security_question" type="text" class="inputValue" id="Security_question" onblur="if (document.getElementById('securityServerError')) document.getElementById('securityServerError').sty le.display='none'" maxlength="40" />
<span class="textfieldRequiredMsg">A value is required.</span></span>
<?php
if (ValidatedField("contact","contact")) {
if ((strpos((",".ValidatedField("contact","contact").","), "," . "5" . ",") !== false || "5" == "")) {
if (!(false)) {
?>
<span id="securityServerError" class="textfieldServerError">Your answer was not correct.</span>
<?php //WAFV_Conditional contact.php contact(4:)
}
}
}?>
<br />
<input type="submit" value="Submit" class="inputButton"/>
</div>
</form>
Ray Borduin
06-19-2009, 07:12 AM
Those are the server validation messages. The spry messages appear:
<span class="textfieldRequiredMsg">A value is required.</span>
if you submit the page it will show the server messages.
roby258376
06-19-2009, 07:31 AM
thanks Ray,
I'll change them. Any reason why this solution ships with the incorrect code?
Ray Borduin
06-19-2009, 07:42 AM
It may be an oversight. We switched from using Validation Toolkit to Spry validation in a recent release. It appears the error messages must not have been updated properly. I will report it as a bug.
roby258376
06-19-2009, 12:29 PM
Another potential bug is that I am using the Contact Form Solution, out of the box, and yet, in the server behaviors, the WA Server Validations and all of the Validation Show If (contact.php) are not editable. Trying to modify them in anyway brings up the error "Please select a form page with WA Server Validation applied".
I have the latest version of WA Validation Toolkt btw.
At this point, I can't edit the thing without handcoding everything, and even at that, it's really easy to break it. Not a good value for the money at this point, imo
Ray Borduin
06-19-2009, 12:33 PM
You should be able to edit them. If you change the page name you may need to specify it again, but it should all work for editing. If you continue to have problems please post a support incident this will allow someone to look into it further with you directly to find the cause and solution.
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.