Steve Piercy - Web Site Builder Techniques for Sequence of Pages
Jun 29, 2009; 06:28
Steve Piercy - Web Site Builder
Techniques for Sequence of Pages
Howdy,
I searched the Knop archive for help, but came up empty with "step", "next" and "sequence".
I would like to have a sequence of forms that progress through ordered steps, sort of like a survey. The steps must be performed in order. A user may resume where they left off. Each step has some validation logic. How would I implement this using Knop?
Handling the failure is no problem: just reload the form. But for the success, I'm trying to figure out the best way to load the next Knop form in the sequence.
First, I assume that the application logic should go into the action file, correct?
If so, then here is some sample code I pulled from the Knop demo files.
if($f -> isvalid); // edited for brevity // add record // update session variable // uhh.... magic? use an include or redirect_url? /if;
if: (!($f -> isvalid) || $f -> error_code) && ($f -> getbutton == 'add' || $f -> getbutton == 'save'); // remain on the same path to show form again $nav -> (setlocation: ($nav -> actionpath)); // show error message $message -> (insert: ($f -> error_msg) + ' ' + ($f -> error_code)); /if;
If I understand that correctly, then the value of the -formaction parameter in the knop form object in the config file determines what is the next page in the sequence:
_config/cfg_advanced_edit.inc ----------------------------- var: 'f'=(knop_form: -formaction=($nav -> (url: 'advanced')), // action attribute for the html form -method='post', -database=$d, -actionpath='advanced/edit', // framework action path
Is -formaction the "magic" that tells Knop what to load next?
--steve
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Steve Piercy Web Site Builder Soquel, CA <web@StevePiercy.com> <http://www.StevePiercy.com/>
-- ############################################################# This message is sent to you because you are subscribed to the mailing list <knop@lists.montania.se>. To unsubscribe, E-mail to: <knop-off@lists.montania.se> Send administrative queries to <knop-request@lists.montania.se> List archive http://www.nabble.com/Knop-Framework-Discussion-f29076.html Project homepage http://montania.se/projects/knop/ Google Code has the latest downloads at http://code.google.com/p/knop/
Jun 30
Johan Solve Re: Techniques for Sequence of Pages
Jun 30, 2009; 00:05
Johan Solve
Re: Techniques for Sequence of Pages
Jun 30
Steve Piercy - Web Site Builder Re: Techniques for Sequence of Pages
Jun 30, 2009; 11:08
Steve Piercy - Web Site Builder
Re: Techniques for Sequence of Pages
Jul 08
Steve Piercy - Web Site Builder Re: Techniques for Sequence of Pages
Jul 08, 2009; 08:31
Steve Piercy - Web Site Builder
Re: Techniques for Sequence of Pages
Jul 09
Johan Solve Re: Techniques for Sequence of Pages
Jul 09, 2009; 00:12
Johan Solve
Re: Techniques for Sequence of Pages
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!