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