close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Contact form as plug-in always redirects to index page

Thread began 6/08/2011 6:49 pm by YellowCircleWeb | Last modified 3/02/2012 8:47 am by Jason Byrnes | 4969 views | 11 replies |

YellowCircleWeb

Contact form as plug-in always redirects to index page

I'm playing around with Framework builder and trying to build a generic contact form as plug-in for inclusion on a php page.

I've created a blank page and added a form to it and then used Universal Email for sending the form contents in an email. I've then referred to this file as my plug-in and added it to a page that is based on a dreamweaver template page.

The contact form displays correctly as a plug-in, but the email doesn't get sent and instead of re-directing to my 'enquiry sent' page it tries to redirect to the index page (which doesn't exist).

If I load the plug-in page itself the redirect works properly? I've attached my files - any help with this is appreciated.

Attached Files
contact-form-plugin-files.zip
Sign in to reply to this post

Jason ByrnesWebAssist

on the contact-plugin.php page, set the forms action to post to the contact-us.php page, alternitvely, you can use the $_SERVER['PHP_SELF'] variable:

php:
<form  action="<?php echo($_SERVER['PHP_SELF']); ?>" method="post" enctype="application/x-www-form-urlencoded" name="frmContactUs" id="frmContactUs">
Sign in to reply to this post

YellowCircleWeb

Thank you Jason, I'll give that a go.

Sign in to reply to this post

Jason ByrnesWebAssist

you're welcome.

Sign in to reply to this post

YellowCircleWeb

That worked perfectly - thanks for the helpful advice Jason.

Sign in to reply to this post

Jason ByrnesWebAssist

glad to hear it is working.

Sign in to reply to this post

MikeyT

Similar Problem

I'm having a similar problem as above. I have a sign-up form as a plug-in placed on the index page. It can be viewed here: neprugby.us It works perfectly except for the redirect to my thankyou.php page. The email is sent as expected, but it always redirects to the following directory (resulting in a 404 error): thankyou.php

The sign-up form plug-in code is attached. I've tried redirecting to both 'thankyou.php' as well as '../thankyou.php' Any help is much appreciated.

Attached Files
sign-up.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

here is an updated copy of the webassist/framework/library.php file that should correct the problem.

Attached Files
library.php.zip
Sign in to reply to this post

MikeyT

Thanks Jason. That worked perfectly. Is that library.php file included in the latest install of Design Extender? Just curious because I think I created the sign-up form before I upgraded to Design Extender. I want to know if I'll need to include that file manually from now on or not.

Also, is there any particular reason why the emails being sent through my form show the time as MST? It should be EST. The date function looks correct in the email file that gets sent out. Could this be something pertaining to the hosting provider?

Sign in to reply to this post

Jason ByrnesWebAssist

I believe that update is included in design Extender.


the timezone is set by the host in the php.ini file, you can add the following code at line to override the host setting and change it to easter time:

php:
<?php 

date_default_timezone_set
('US/Eastern'); 
?>
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...