multi-step signup with save() at the last step?

thread: 7 messages  |  last: a year ago  |  started: tuesday, march 30, 2010, 4:54 pm pdt


#1  |  kingwithin (San Francisco, CA) United States of America
Tuesday, March 30, 2010, 4:54 PM PDT

I have a brief, multi-step signup where I get the user names in the first page and then the email on the last step.

Will Qcodo know the values for the $objUser I am creating so that I can just do a save() at the last step?

This way nothing it stored until they get to the very end?

#2  |  VexedPanda (Calgary, AB) Canada
Wednesday, March 31, 2010, 8:11 AM PDT

If you have every step done by the same QForm, via showing/hiding divs for example, then yes.
If you have it broken into multiple files, then no, you'll need to find a different way of persisting the data, such as storing it in session temporarily.

#3  |  kingwithin (San Francisco, CA) United States of America
Thursday, April 1, 2010, 1:04 PM PDT

Ah, that's an idea I hadn't thought of, just using the single QForm and then displaying with different divs....any downsides to that?

#4  |  kingwithin (San Francisco, CA) United States of America
Thursday, April 1, 2010, 1:06 PM PDT

How would I do that, actually, right now, when I submit, I just  use a Redirect to the next step/file...can you give me an example of what goes into the _Click() to do that?

I assume the .tpl.php would just have <div id=“step1”> etc....

thanks.

#5  |  VexedPanda (Calgary, AB) Canada
Thursday, April 1, 2010, 1:26 PM PDT

The way I've done it is to render a series of QPanels. Basically, take each step and instead of making a QForm from it, make a control that extends QPanel. In your QForm, just create and render one of each type of panels (step). Then set Display for each of them so that only the appropriate one is shown at a time.

Previous and Next buttons can control which panel (step) to display.

#6  |  kingwithin (San Francisco, CA) United States of America
Sunday, April 18, 2010, 10:52 PM PDT

Do you have an example?

Why this is approach preferable?  Is it because of the data-object not stored until the end and the problems of maintaining “state” from one page to the next?

#7  |  VexedPanda (Calgary, AB) Canada
Monday, April 19, 2010, 8:46 AM PDT

No, I don't have an example. And the approach is preferable for exactly the reasons you state. :)



Copyright © 2005 - 2012, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.