Projects / Multipage forms generation and validation class

Multipage forms generation and validation class

The multipage forms generation and validation class is an extension to a PHP class that helps it manage forms that are presented in multiple pages. It features a sequential mode (Wizard mode) in which input fields appear in pages that are accessed in sequence using the navigation buttons "Continue >>", "<< Back", "Finish >>", and "Cancel", a random access mode (Tabbed pages mode) in which input fields appear in pages that may be accessed in any order using buttons at the top to go directly to each page and buttons at the bottom named "Modify", "Save", and "Cancel", and redefinable navigation button and error message text strings.

Tags
Operating Systems
Implementation

Recent releases

  •  21 Nov 2000 13:57

    Release Notes: Initial freshmeat announcement.

    Recent comments

    24 Sep 2001 12:57 mlemos

    Re: Assign values to fields from a db to modify/delete it

    > I think the test_random_form.html as an
    > example
    > to modify/delete the values previously
    > inserted from
    > test_sequential_form.html and
    > eventually stored in
    > some way (db, text file, etc.)
    > How do I will able to retrieve my
    > stored datas and
    > assign it as fields VALUE?
    > I've tried to create a page with a
    > small form where
    > user can insert some search value
    > Action value of that form is
    > test_random_form.html
    > here is the point of my little brain
    > stop himself.
    > Values are showed in first sub form
    > but they are lost
    > when I pass to another subform.


    To retrieve or set input values, use the form object GetInputValue/SetInputValue functions.

    24 Sep 2001 10:12 valemax

    Assign values to fields from a db to modify/delete it

    I think the test_random_form.html as an example

    to modify/delete the values previously inserted from

    test_sequential_form.html and eventually stored in

    some way (db, text file, etc.)

    How do I will able to retrieve my stored datas and

    assign it as fields VALUE?

    I've tried to create a page with a small form where

    user can insert some search value

    Action value of that form is test_random_form.html

    here is the point of my little brain stop himself.

    Values are showed in first sub form but they are lost

    when I pass to another subform.

    Suggestion and help are very appreciated.

    -Valerio-

    10 Sep 2001 11:28 valemax

    Re: How pass a first subform's value to the second one

    >
    > % In the if at line 1 WasSubmitted
    > % works, but GetInputValue at line 3
    > % return nothing why?
    >
    > % Many Thanks
    >
    >
    > GetInputValue only retrieves values
    > previously loaded with LoadInpuValues.
    >


    Ok now!


    1: if ($this->paged_form_object->WasSubmitted("reminder") and $this->page_names[$this->page] == "Identification") {

    2:$this->paged_form_object->LoadInputValues("reminder");

    3: $opt_attr = array();

    4: $d_nz = $this->paged_form_object->GetInputValue("reminder");

    5: $opt = GetOpDisp($d_nz);

    6: $attributes = array();

    7: $attributes["TYPE"]="select";

    8: $attributes["NAME"]="op_serv";

    Still Many thanks ang good work Manuel

    -Valerio Felici-

    09 Sep 2001 21:45 mlemos

    Re: How pass a first subform's value to the second one

    > In the if at line 1 WasSubmitted
    > works, but GetInputValue at line 3
    > return nothing why?

    > Many Thanks

    GetInputValue only retrieves values previously loaded with LoadInpuValues.

    See the forms generation and validation class (http://phpclasses.UpperDesign.com/browse.html/package/1) documentation for more details.

    09 Sep 2001 21:17 valemax

    How pass a first subform's value to the second one
    This code has added to your fiile subscriptionclass.php:

    1: if ($this->paged_form_object->WasSubmitted("reminder") and $this->page_names[$this->page] == "Identification") {

    2: $opt_attr = array();

    3: $d_nz = $this->paged_form_object->GetInputValue("reminder");

    4: $opt = GetOpDisp($d_nz);

    5: $attributes = array();

    6: $attributes["TYPE"]="select";

    7: $attributes["NAME"]="op_serv";

    $opt_line = explode('^',$opt);

    $opt_num = count($opt_line);

    for($i=0;$i
    $kv = explode('*',$opt_line[$i]);

    $opt_attr[$kv[0]] = $kv[1];

    }

    $attributes["OPTIONS"]=$opt_attr;

    $attributes["VALUE"]="999";

    $attributes["ValidationErrorMessage"]
    ="Non stato specificato un Operatore.";

    $attributes["SubForm"]
    ="personaldata";

    $extrattrib=array();

    $extrattrib["class"]="input";

    $attributes["ExtraAttributes"]=$extrattrib;

    $this->paged_form_object->AddInput($attributes);

    }


    In the if at line 1 WasSubmitted works, but GetInputValue at line 3 return nothing why?

    Many Thanks

    Screenshot

    Project Spotlight

    OpenStack4j

    A Fluent OpenStack client API for Java.

    Screenshot

    Project Spotlight

    TurnKey TWiki Appliance

    A TWiki appliance that is easy to use and lightweight.