Mailing List Archive

hidden metacommand
Hello,

I have two forms in a page.

What is the correct method for reset the fields
from %idat for the next form take all fields ?

I put this code and works fine :

<form name="frm_1" method="post" target="_self">
.....
[$ hidden $]

</form>

....

[.-
%idat_ori = %idat;
foreach $llave (keys %idat) {
delete $idat{$llave};
}
-]
<form name="frm_2" method="post" target="_self">
...
[$ hidden $]
</form>
[-
%idat= %idat_ori;
-]

That is ok ?
I need to backup %idat or only if I need in other code at end of file ?

thanks in adavnce ....
RE: hidden metacommand [ In reply to ]
Hello,
>
> [.-
> %idat_ori = %idat;
> foreach $llave (keys %idat) {
> delete $idat{$llave};
> }
> -]

The following is shorter:

[- %idat = () -]

> I need to backup %idat or only if I need in other code at end of file ?
>

You don't need to backup %idat.

Gerald


-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------