[htmltmpl] Dynamic and sticky forms
Brought to you by:
samtregar
From: Wojciech P. <W.P...@it...> - 2003-09-26 09:58:07
|
Hi, I have a form that collects info about books' authors.=20 There is a popup menu idicating the number of authors=20 and dynamic number of text fields for the authors' names. Here you are (simplified example): <-- how many authors --> <select name=3D"nr_of_authors" onChange=3Dsubmit()> <option value=3D"1">1</option> <option value=3D"2" selected>2</option> <option value=3D"3">3</option> </select> <-- create fields for authors --> <form> <input type=3D"text" name=3D"author_1" value=3D""><br> <input type=3D"text" name=3D"author_2" value=3D""><br> <form> This is a part of authors.tmpl: <TMPL_LOOP NAME=3D"aut_loop"> <input type=3D"text" name=3Dauthor_<TMPL_VAR NAME=3D"__counter__"> va= lue=3D"?"><br> </TMPL_LOOP> Does anybody know how I can make that formy sticky and take advantage of associate function? What should I put in the place of question mark? It looks like <TMPL_VAR NAME=3D"author_<TMPL_VAR NAME=3D"__counter__">"> doe= s not work. Thank you in advance. Wojciech Pietro=F1 |