close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Form Redirect

Thread began 7/25/2011 11:00 am by ehumbert267432 | Last modified 7/27/2011 9:32 am by MikeyT | 3074 views | 9 replies |

ehumbert267432

Form Redirect

I've created a form to upload files to a specified directory on the server. This form is a pre-existing form, and it works, especially since I used Form Builder to specify how the uploads were handled. All works well, and I used the pre-existing form because when I try and build it from scratch (the page layout was built using a Dreamweaver template) it seems to force the form to drop about 10 lines below the existing text. Hand creating the form works without the big gap.

So, the form is uploading the files quite satisfyingly. Now, I need to put in a redirect when completed, so that the customer will get a message thanking them. Message page is built, but I can't figure out how to redirect to the thank-you page. Any thoughts?

Gene

Sign in to reply to this post

Ray BorduinWebAssist

Do you send an email or Insert into a database with the form? If so you can add a redirect in the email or insert record server behavior.

If you are just uploading a file and aren't using the data in any other way, then you could manually add redirect code like:

<?php
if (isset($_POST("submitbuttonname"))) header("location: thankyoupage.php");
?>

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

ehumbert267432

Got that part, but....

Now the client wants the names of the files that were uploaded listed in the email. I used variables (upload1, upload2, etc) as the names used by the file upload that Form Builder offers. Can I use them somehow to add to the email generated? I'm new at this stuff, so I don't know quite what I'm doing here.

Gene

Sign in to reply to this post

ehumbert267432

also...

After posting the first message, I dug into the email utilities offered and figured out the redirect, and it's working fine. I need to change the format of the email so that it doesn't send all the info that the template provides. They aren't interested in the subheader section, so I need to remove it. Is that a problem?

Gene

Sign in to reply to this post

Ray BorduinWebAssist

Not a problem, just update the associated email template file and you can remove the code that automatically adds all of the form elements and replace it with a custom page that only shows what you want in the style that you want.

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

MikeyT

Ray, is it possible to trigger a thankyou.php page upon form submit without the need for an email or what Universal Email offers? My form action is a client supplied url that captures the text field information so I can't use <?php echo(htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)); ?>"> - or at least I think I can't since the url needs to be the form action value.

The form functions fine as is, but when you submit information you're directed to the url which is just a blank page. So the user experience is lacking.

I wasn't sure if there was a php solution for this scenario and whether or not I should just use a jQuery modal window to serve up a confirmation message instead.

Sorry, don't mean to hijack this thread.

Sign in to reply to this post

Ray BorduinWebAssist

Is the action page a php page? If so you can update the code on the blank page to redirect to another page like:

<?php
if (isset($_POST("submitbuttonname"))) header("location: thankyoupage.php");
?>
Edit/Delete Message

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

MikeyT

I'm not sure actually. I was given names and values to use for the form fields, as well as two hidden fields, and the following url to use as the form action (altered for anonymity)

altered.WebToLead?encoding=UTF-8

When you submit the form, you're taken to this page but its a blank page - assuming because the form info is being inserted into the lead retrieval system. No actual page exists.

I've confirmed with the client that all is working properly on their end.

Sign in to reply to this post

Ray BorduinWebAssist

Maybe there is another field name that works with that system that allows you to set the redirect page? I'd ask the people that gave you the field names to use if there is a field name you can add to set a page to display on completion.

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

MikeyT

Thanks for your help, Ray.

Problem solved: I was overlooking one of the hidden fields that is to be used for a return url. Assigning the value to my confirmation page did the trick.

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