PDA

View Full Version : Validation show if behavior error - changes to code that is not marked as editable


Kevin373660
09-18-2009, 08:18 AM
DWCS3 error msg after completing page 72 of "Validation Toolkit Recipies", setting server behavior -> validation toolkit

->validation show if.

After configuraiton is set and you click on the "ok" button, the following error pops-up. This only happens with the first

elemement. There is no code placed outside of the editable region on the page that I can find. All of the pages are from a common template. Older pages which had validation set and were working are now showing a red "!" warning beside each "validation show if" behavior. Please confirm what I should do to correct the problem. I am setting up validation on 9 new forms with 7 completed previously completed and working (now with error warning). Is it simple or do I need to open a ticket?

Adobe Dreamweaver CS3
You have made changes to code that is not marked as editable. If you retain those changes, they will be lost the next time you apply a template update to this file. Do you want to retain the chages until then?


THE FOLLOWING PHP CODE BLOCK IS ADDED INSIDE THE FORM TABLE:
<?php
if (ValidatedField('memberRegistration1','memberRegis tration1')) {
if ((strpos((",".ValidatedField("memberRegistration1","memberRegistration1").","), "," . "" . ",") !== false || "" == "")) {
if (!(false)) {
?>
* Please correct the error(s) indicated.
<?php //WAFV_Conditional member_Registration1.php memberRegistration1( :)
}
}
}?>

Jason Byrnes
09-18-2009, 09:55 AM
This is one of those Dreamweaver errors that has been around forever without a solid fix.

The best work around that I have found is to temporarily detach the page from the template. To do this, close the page in Dreamweaver, and open it in a text editor, I prefer Textpad.

Just after the <head> tag, is the tag that attaches the page to the template, it will look like:

<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/Main.dwt.php" codeOutsideHTMLIsLocked="false" -->


Cut the template tag;
<!-- InstanceBegin template="/Templates/Main.dwt.php" codeOutsideHTMLIsLocked="false" -->

and paste it into a new document so you can add it back in later.

Save the page, close it in the text editor and open it in Dreamweaver to add the Validation Show if. When you are done, close it in Dreamweaver, open it in your text editor and paste the template tag back in after the <head> tag to reattach it to the template.

Kevin373660
09-18-2009, 10:09 AM
Thanks Jason for that workaround.

For pages that I have already setup the validations for, do I have to do the validations over (the new pages seem to work/errors on show if apears only in the email pages that you helped me with before)? Or is this simply a DW popup that won't that will not effect the pages?

Jason Byrnes
09-18-2009, 10:30 AM
No, if the other pages are working fine, you do not need to change anything.

johna1964
12-21-2011, 01:55 PM
hi,

Can I use this work around for server validations for the checkout and confirm pages?

Thank you!

johna 1964