How do I do this?

Using the excellent PHP Feedback form requires a Success and Fail Page after the form is sent.
In my application, I don’t want to use a full size page as it would be much easier for a viewer to close a floating window instead.
I have tried to use a full black page with a loading gif as the Success/Fail Page. To this I have added a Timed Spawn New Window Action with a delay of 3 seconds which I want to open the floating window - which is a 450px square page with the Success (or fail) message and this page has a graphic button with close window action. the plan being it will leave me on the original page.
This is not working - has anyone a work-around

Thanks

Trev


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Not sure if that confuses the PHP form by not actually starting over to fix mistakes, but trying to fix them on a page that already has the mistakes and is still open.

I’m sure Tim will chime in with the correct solution…

Bob


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Currently the action is written so that all of the brains of the PHP
is held in a separate .php file. The (filename)-go.php file the action
creates is self contained and processes the form data and handles any
errors that may crop up. The overall benefit of doing all of this in a
separate file is that your Freeway page can remain as a regular html
file and you don’t need to swap the file extension to .php which, in
itself, exposes problems with previewing your pages locally.

What Tev wants to do is more than possible but would require the form
to submit the form data to the same page as it is on. This would then
process the data or return the user back to the same filled out form
if there was an issue.

Trev, if you wanted to edit the -go.php file to do something this then
I can give you some pointers.
Regards,
Tim.

On 5 Mar 2010, at 14:51, Robert B wrote:

Not sure if that confuses the PHP form by not actually starting over
to fix mistakes, but trying to fix them on a page that already has
the mistakes and is still open.

I’m sure Tim will chime in with the correct solution…

Bob

FreewayActions.com - Freeware and commercial actions for Freeway
Express & Pro.

Protect your mailto links from being harvested by spambots with Anti
Spam.
Only available at FreewayActions.com

http://www.freewayactions.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Yeah, I figured you’d clear things up. I was just going off the top of my head.

You know, talking through my hat!

Bob


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks for your reply Tim.

Perhaps If I could expand on my reasons for wanting to do this in the first place it might sound a bit more sensible.

I am currently working on a site that has several pages which contain the same form - In the 1st instance i’m using it for a simple add me to mail list. I also use it on the site in 2 other locations also - 1 for general feedback and 1 for a Price match request.

It is a great action and very easy to use in Freeway.

I just thought that in the 1st case - a user will send the form from any of the pages and when they get the return message (ie: the success page) they will have to re-navigate back to the page the form was on or just go to some other page as the “report page” is an html page on its own"

I just thought that if the return message was perhaps a closeable window on the page it would help the user.
Maybe I am asking for too much.

Am I making any sense!

Thanks

Trev


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Just add a javascript ‘back’ link to the success/fail page ie

javascript:history.go(-1)

Apply this as a normal link using javascript as the protocol and the history.go(-1) as the link

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Dave

You make it sound easy!

Trev = don’t know much about code.

Can you explain the steps in Freeway.

Thanks

Trev


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Add the text to your error/success page ie ‘Back’

Select the text Edit>Hyperlink

In the resulting dialogue choose javascript from the dropdown list As opposed to http or mailto etc

Add the link as ‘history.go(-1)’ (without the apostrophes!)

OK the dialogue - Done!

If you visit the page from a link from another page (like your form) then click the Back link javascript checks your browser history and takes you back to the page you came from.

If you go to the page directly (by typing the URL) then it wont work.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

An example of it in use http://www.deltadzine.net/thanks.html

If you want to send more then click here

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Dave that is fantastic and just what I to happen.

I will have a play in the morning are report back -
meantime - thanks again.

Kind Regards

Trev


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Bear in mind you should always have a link like this on your error pages so that the visitor can go back and correct a mistake.

The advantage is that doing it this way all the form info that they filled in will be there when they go back and they will not have to input it all over again!.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Add the text to your error/success page ie ‘Back’

Select the text Edit>Hyperlink

In the resulting dialogue choose javascript from the dropdown list As opposed to http or mailto etc

Add the link as ‘history.go(-1)’ (without the apostrophes!)

OK the dialogue - Done!

Sorry forgot that when you first open the Edit>Hyperlink Dialogue box you choose External from the Internal/External options at the top.

So it should look like this

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thankyou for the follow up and advice Dave.
Very much appreciated.

Trev


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Dave’s solution works OK but the back link from the success page takes me back to the original form page and the fields are still filled in. Is there a way to return and the fields would be clear.

Thanks

Trev


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Dave’s solution works OK but the back link from the success page takes me back to the original form page and the fields are still filled in.

But why would you want to go back from the success page - there are no errors to correct so no need to go back. Go on instead and don’t put a ‘Back’ link on the Success page!

I am sorry if my original post suggested a Back link from the Success page coz it isn’t necessary.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You are quite right Dave . .

My mistake - i picked up “Add the text to your error/success page ie ‘Back’” to mean both pages.
Too long at the computer today.

Thanks for the clarification.

Regards

Trev


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi folks,
Yes, I got this to work too… eeeh… partly. Having two more questions:

  1. For some reason the filled in info is not there when it goes back to the form. Wonder why?
  2. Correct if I conclude that we we are talking about a full page rather then what Trev suggested before to have a pop-up? I would love to see that as well :slight_smile: Any ideas how to go about that?

Thanks,
Paul


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

For some reason the filled in info is not there when it goes back to the form. Wonder why?

Post a link Paul and we will have a look

Correct if I conclude that we we are talking about a full page rather then what Trev suggested

Yes!

have a pop-up?

This is not possible with the current action and would require a different form construction method that submits the form back to the page that it is on. This page would then need to be a .php page. Beyond my ken!

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options