PDA

View Full Version : Validation Bug Found


Dave Buchholz
11-04-2009, 04:38 AM
CS4 / OSX 10.5.8 / CSS Form Builder 1.0.0

Applying server side validation to a custom form generates the following code:

<?php
if (isset($_POST["addnow"])) {
$WAFV_Redirect = "";
$_SESSION['WAVT_index_666_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRQ(((isset($_POST["title"]))?$_POST["title"]:"") . "",true,1);
$WAFV_Errors .= WAValidateAN(((isset($_POST["sortorder"]))?$_POST["sortorder"]:"") . "",false,false,true,false,"",true,2);

if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"index_666");
}
}
?>


note the _666 which has been added to the name of the page. Now when I apply the validation entry to the form field to retain information after validation fails I get this code:

<input type="text" name="title" id="title" value="<?php echo(ValidatedField("index","S_title")) ?>" />


note that extension has not inserted the _666 after the file name so the info will never show.

Eric Mittman
11-05-2009, 12:24 PM
I think that this issue has been resolved in the latest build of CSS Form Builder. This should be available to you in your downloads area under CSS Form Builder in the beta builds area. Please give this a try and let us know if you have any further problems with it.

Dave Buchholz
11-05-2009, 01:18 PM
Eric,

It isn't listed in the read me as being solved but I'll give it a go and see what happens.

Eric Mittman
11-05-2009, 06:41 PM
Thanks, I did try it myself with the 1.0.1 and did not have the problem and had a colleague mention to me that this issue should be resolved in the new beta. I think that the issue was not properly logged so it might not appear in the notes. If you have any more problems with it let us know.