close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

CSS Form Builder non re-entrant or partly buggy ?

Thread began 6/07/2010 6:30 am by Laurent | Last modified 6/07/2010 12:37 pm by Laurent | 3282 views | 7 replies |

Laurent

CSS Form Builder non re-entrant or partly buggy ?

Hi,

Wondering why my form won't work anymore after editing and i found that the extension will create new variables names based on labels choosen, without removing old code or warning you.

So i get this king of duplicate code :

<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$WAFV_Redirect = "contact.php";
$_SESSION['WAVT_contact2_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRQ((isset($_POST["Contact_me_group_Name"])?$_POST["Contact_me_group_Name"]:"") . "",true,1);
$WAFV_Errors .= WAValidateEM((isset($_POST["Contact_me_group_Email"])?$_POST["Contact_me_group_Email"]:"") . "",true,2);
$WAFV_Errors .= WAValidateLE((strtolower(isset($_POST["Contact_me_group_Security_code"])?$_POST["Contact_me_group_Security_code"]:"")) . "",((isset($_SESSION["captcha_Contact_me_group_Security_code"]))?strtolower($_SESSION["captcha_Contact_me_group_Security_code"]):"") . "",true,3);
$WAFV_Errors .= WAValidateRX((isset($_POST["HiddenFields_fields"])?$_POST["HiddenFields_fields"]:"") . "","/.*/",false,5);

if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"contact2");
}
}
?>
<?php
if (isset($_POST["SimpleContact_submit_x"]) && !isset($_GET["invalid"])) {
$WAFV_Redirect = "contact.php";
$_SESSION['WAVT_contact2_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRQ((isset($_POST["Contact_me_group_Nom"])?$_POST["Contact_me_group_Nom"]:"") . "",true,1);
$WAFV_Errors .= WAValidateEM((isset($_POST["Contact_me_group_Email"])?$_POST["Contact_me_group_Email"]:"") . "",true,2);
$WAFV_Errors .= WAValidateRQ((isset($_POST["Contact_me_group_Message"])?$_POST["Contact_me_group_Message"]:"") . "",true,3);
$WAFV_Errors .= WAValidateLE((strtolower(isset($_POST["Contact_me_group_Code_Securite"])?$_POST["Contact_me_group_Code_Securite"]:"")) . "",((isset($_SESSION["captcha_Contact_me_group_Code_Securite"]))?strtolower($_SESSION["captcha_Contact_me_group_Code_Securite"]):"") . "",true,4);
$WAFV_Errors .= WAValidateRX((isset($_POST["HiddenFields_fields"])?$_POST["HiddenFields_fields"]:"") . "","/.*/",false,5);

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

Regards

Sign in to reply to this post

Ray BorduinWebAssist

Though technically non re-entrant... since any updates you make after application will not be recognized... it should still remove and replace any form and not create duplicate code like this, so this sounds like a bug, but it depends on your process.

To edit the form, make sure to click the edit button after highlighting the form in the properties inspector window. If you simply highlight and reapply over the old form it would not properly replace all of the other parts of the code, so that may be what happened in this case.

I will report it to the QA team to log as a bug and investigate a solution.

Sign in to reply to this post
Did this help? Tips are appreciated...

Laurent

Here is a screen shot detailing step 1 and 2. This is where i clic, first, on the blue frame, and the on the edit buttons.

Hope this is usefull.

Regards

Laurent

Sign in to reply to this post

Ray BorduinWebAssist

Thanks for the follow up. It appears it is a bug. You can of course delete the repeated code for now, but we will work on getting this problem reproduced and fixed. Just so we are on the same page, what version of form builder do you have installed?

Sign in to reply to this post
Did this help? Tips are appreciated...

Matthew Meling

Would you mind attaching a copy of your page before the duplicate code was inserted so we can try to reproduce it?

Thank you

Sign in to reply to this post

Laurent

I have version 1.0.1. I am afraid i don't have it anymore, but i will try to reproduce a new one for you an update you ASAP

Sign in to reply to this post

Matthew Meling

Awesome. Thank you very much

Sign in to reply to this post

Laurent

You will find attached in the zip, 4 files :

Before re-applying CSS Form Builder (2 files) :
---------------------------------------------
contact-bug.php submits to contact2-bug.php and works fine.

Notice sometimes on Firefox 3.6.3 Vista 64 there is strange things happening. A kind of variable persistance ; a get the message "Please enter a full email address" when reloading the page, having all fields empty, and other strange thing. I don't remember exactly but i know i had to completely close Firefox to have work correctly. Do you know how some cookie or session pb in this version of FF 3 ?


After re-applying CSS Form Builder and changing some labels (2 files) :
-------------------------------------------------------------------
contact-bug-after.php submits to contact2-bug-after.php and doesn't work any more because of duplicate code.

I also notice this difference between the begining of the 2 blocs of codes :
if ($_SERVER["REQUEST_METHOD"] == "POST") (-->herited from first step/file)
and
if (isset($_POST["SimpleContact_submit_x"]) && !isset($_GET["invalid"])) { (-->new code)

Regards

Laurent

Attached Files
contact-bug.zip
Sign in to reply to this post

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