close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Framework with CSS Forms don't function as intended.

Thread began 8/13/2010 1:36 am by Jaffa | Last modified 8/18/2010 11:13 am by Ray Borduin | 1469 views | 10 replies |

Jaffa

Framework with CSS Forms don't function as intended.

I thought i'd create a standard set of contact forms and use them as includes using framework when i needed them but seems it won't work this way.

Create a standard php page with a ccs form in it and use the security options within the
form. Save it out.

Create a new php form and use the framework extension to include the contact form you made first in your new form.

Run and all looks great and seems to work as intended until you enter in a incorrect security code for the form. The form jumps out of the php page and shows the contact form by itself with thw validate warning on the screen.

Anyone shed any light how to keep everything in the on form or am i not doing something. Don't have an example to show you as i deleted it, but will re-create if required to demo what i need.

Cheers

Sign in to reply to this post

Russell CollinsBeta Tester

Hi Jaffa,

Have you tried using a dynamic plug-in and not static ?

Russ

Sign in to reply to this post

Ray BorduinWebAssist

Hi Jaffa... It sounds like it should work... I'd love to look into it with you. If you could zip up the files and attach them I can try to reproduce it myself.... or if you email me ray@webassist.com and let me know a good time and phone number to reach you we can do some screen sharing and I'll debug it with you directlly.

Sign in to reply to this post

Jaffa

Files attached

OK, I recreated the files using a a very basic shell in order to only show the WA extension files and code. If you run this you will see that all works as intended until you enter in an incorrect Security Code, this is when it jumps out of the form.

Any insight into why this would happen would be appreciated. I see no reason why using a dynamic plugi would be required in this case as I'm calling the form directly.

Cheers.

Attached Files
css_form.zip
Sign in to reply to this post

Ray BorduinWebAssist

In order to fix the problem you need to update the redirect setting for the server validation on the contact_basic.php page.

By default the form redirects to itself, which in this case redirects to the plugin and not the page.

Update line 5 of contact_basic.php to from:
$WAFV_Redirect = "contact_basic.php?invalid=true";

to:
$WAFV_Redirect = "" . $_SERVER["PHP_SELF"] . "?invalid=true";

That should fix the problem. We'll probably have to update form builder's server validation to use that code automatically so that it will work better with plugins by default in the future.

Sign in to reply to this post

Russell CollinsBeta Tester

Hi,

I tried correcting line 5 but made no difference to Jaffa's example.
I made a few pages of my own and corrected the redirect but still made no change to the problem.

Russ

Sign in to reply to this post

Ray BorduinWebAssist

Yes... sorry I forgot that the page name is also referenced in the form action:

on iline 133 you would also update the other page reference to use the php_self server variable so that it would be portable as a plugin.

action="contact_basic.php"

becomes:

action="<?php echo($_SERVER["PHP_SELF"]); ?>"

Sign in to reply to this post

Jaffa

The 2 changes corrected the initial problem but the redirect to the thank you page still has issues, Object not found error.

Sign in to reply to this post

Ray BorduinWebAssist

I see. The issue here is that framework builder automatically updates any links that occur in the html, but can't update the server redirect page. This means that the path to the redirect page has to be relative to the page it is included on, and not the plugin itself.

The simple solution is to update line 32 where it says:

$GotToPage = "../thank_you_basic_form.php";

and make it say:

$GoToPage = "thank_you_basic_form.php";

That will make it work in this case, but hurts the portability of the code.... since you can not effectively plug it into any subdirectory pages.

A more elegant, though more complex solution would be to use a redirect like:

<?php echo(rel2abs("../thank_you_basic_form.php",dirname(__FILE__))); ?>

This will use the library file to convert the redirect link reference to be relative to the page it is plugged into. This slightly more complex syntax should keep the plugin fully portable, and could be similarly used in other server behaviors when applied to plugins.

We will likely account for this in future versions of the extensions now that the framework builder is released.

Sign in to reply to this post

Jaffa

Thanks for the workaround. If I use relative path to absolute path so that the redirects work what effect will it have on the page once these types of bugs are sorted out?

Meaning once this is achievable within the framework extension do i have to uncode the changes in order to apply them correctly uisng the wizard.

The reason I'm asking is that I'm developing a complex application for a client, I'd hate to have to go in and re-write the modules.

Maybe i should go back to includes and wait for a stable version.

-Dave

Sign in to reply to this post
loading

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