CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 redirect based on existing form response

Print topic Send  topic

Author Message
blasalle

Posts: 69
Posted: 05/29/2009, 7:49 AM

I have a series of forms that are part of a survey. At the end of each form participants are asked if they want to return at a later time or are finished (radio buttons). If they indicate that they are finished I would like to use that integer value to display a different page the next time the form is called.

I'm thinking of possibly using a php redirect in Custom Code during the Before Show event - something like:

global $Redirect;
$finished = $Container->form_status->GetValue();
if ($finished ==2) {
$Redirect = "finished.php";
}

Does this seem like a reasonable solution?

bernie


_________________
Bernie
University of Utah
Salt Lake City, UT USA
View profile  Send private message
melvyn


Posts: 333
Posted: 05/29/2009, 11:44 AM

Yes. And no.
Why yes? Because the code will work.
Why no? Because the Before Show event will run at first and the user will be redirected before watching the survey. The correct event will be After Insert.


M.
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com
View profile  Send private message
blasalle

Posts: 69
Posted: 05/29/2009, 12:09 PM

Melvin - thanks for the reply.

Perhaps it is what I want after all. If the the value is 1 I want them to see the form - if it is 2 I don't want them to see it all. But I may be missing something... I'll try and see what happens on a test server.

bernie


_________________
Bernie
University of Utah
Salt Lake City, UT USA
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.