close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Data assist, CSS formbuilder 2 html editor Bug or problem with validations

Thread began 11/26/2010 11:19 pm by Miguel | Last modified 2/08/2011 2:02 pm by Miguel | 2987 views | 10 replies

Miguel

after rechecking and comparing with older sites i found out what the problem is and its with the new css form builder 2 on the file that it generates called wavt_validatedform_php.php

it comes with

php:
<?php
if (!session_id())  {
  
session_start();
}
function 
ValidatedField($page,$field)  {
  
$theFields"";
  
$retVal "";
  if (isset(
$_SESSION["WAVT_".$page."_Errors"]))  {
    
$theFields "&".$_SESSION["WAVT_".$page."_Errors"];
  }
  if (
strpos($theFields,"&WAVT_".$field."=") !== false)  {
    
$retVal substr($theFields,strpos($theFields,"&WAVT_".$field."=")+strlen("&WAVT_".$field."="));
  }
  if (
strpos($retVal,"&WAVT_") !== false)  {
    
$retVal substr($retVal,0,strpos($retVal,"&WAVT_"));
  }
  if (
$retVal == "" && $page == $field) {
    
$retVal ValidatedField($page,$field."_Errors");
  }
   return 
str_replace("<","&lt;",str_replace(">","&gt;",str_replace('"',"&quot;",$retVal)));
}

?>



On my other sites where this problem doesnt come in the same file that was created by css form builder 1 was

php:
<?php
if (!session_id())  {
  
session_start();
}
function 
ValidatedField($page,$field)  {
  
$theFields"";
  
$retVal "";
  if (isset(
$_SESSION["WAVT_".$page."_Errors"]))  {
    
$theFields "&".$_SESSION["WAVT_".$page."_Errors"];
  }
  if (
strpos($theFields,"&WAVT_".$field."=") !== false)  {
    
$retVal substr($theFields,strpos($theFields,"&WAVT_".$field."=")+strlen("&WAVT_".$field."="));
  }
  if (
strpos($retVal,"&WAVT_") !== false)  {
    
$retVal substr($retVal,0,strpos($retVal,"&WAVT_"));
  }
  if (
$retVal == "" && $page == $field) {
    
$retVal ValidatedField($page,$field."_Errors");
  }
  return 
$retVal;
}

?>




Comparing both files i notice this line wich is the one that afects the html editor with css form builder or the new validation toolkit it comes with

php:
return str_replace("<","&lt;",str_replace(">","&gt;",str_replace('"',"&quot;",$retVal)));



So i replaced the new file generated by css form builder 2 with the one generated with css form builder 1 and works, my suggestion is that i know it is to avoid exploits or code injections but im working internally with the manager of the site im building, when i use the old file every thing is marked on the server behavoir as invalid and cant do any change cause it will overwrite the file again, css form builder should come with a file asking wich type of validation file should it use or something to avoid this, it works ok when its for page update but not when its for page insert taking the initial value from the validation form fields, when this happens the html editor shows those tags or quot wich is a pain in the a....

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...