Branches
Releases
|
Version
|
Focus
|
Date
|
|
2000.11.20
|
N/A |
21-Nov-2000 13:57 |
Comments
[»]
Assign values to fields from a db to modify/delete it
by ValeMax - Sep 24th 2001 10:12:15
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-
[reply]
[top]
[»]
Re: Assign values to fields from a db to modify/delete it
by Manuel Lemos - Sep 24th 2001 12:57:26
> 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.
[reply]
[top]
[»]
How pass a first subform's value to the second one
by ValeMax - Sep 9th 2001 21:17:21
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
[reply]
[top]
[»]
Re: How pass a first subform's value to the second one
by Manuel Lemos - Sep 9th 2001 21:45:36
> 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 documentation for more details.
[reply]
[top]
[»]
Re: How pass a first subform's value to the second one
by ValeMax - Sep 10th 2001 11:28:47
>
> % 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-
[reply]
[top]
|