in reply to Re: altering existing form
in thread altering existing form

Correct form.tmpl is just HTML and has:
<input type=text name="dept" size=30>
display.tmpl has:
<strong>Department: </strong><TMPL_VAR NAME=DEPARTMENT><BR>
body.tmpl has:
Department: <TMPL_VAR NAME=DEPARTMENT>
UPDATE
I think I just need to add DEPT in %formparams, it's contents will be the @dept, and in the form.tmpl stick in
<select name="dept"><TMPL_VAR NAME=DEPT></select> Gonna try that...

Replies are listed 'Best First'.
Re^3: altering existing form
by EvanK (Chaplain) on Feb 27, 2007 at 15:29 UTC
    In that case, you want to replace the aforementioned <input> element in form.tmpl with a <select> element with an HTML::Template loop inside it:
    <select name="dept"> <TMPL_LOOP NAME="DEPT_LOOP"> <option value="<TMPL_VAR NAME="DEPT">"><TMPL_VAR NAME="DEPT"> </TMPL_LOOP> </select>
    Then, from within your script, you want to select all possible departments from your database, and populate that list using the loop name (DEPT_LOOP in the example). For more info on how to do that, see the HTML::Template docs.

    __________
    Systems development is like banging your head against a wall...
    It's usually very painful, but if you're persistent, you'll get through it.