On Tue, 26 Feb 2002, BeerBong wrote:

> Hello all!

Hi.

> If field in SQL table is null and it is present in hashref then input
> field doesn't appear and even manager can't modify it.

Okay, okay.  You're trying to do too much in the template.  There's two
things you need to pass to the template

 a) Tell it if the user has access to that username (so it knows to
    display that form)
 b) The default username (even if it is empty)

The template should be dumb - it shouldn't have to determine a) from b).
Do the application logic in your perl code.

How about doing something like

__perl__
$return_to_template->{first_field_allow} = !$deny{first_field};

__Template__
[% FOREACH row = rows %]
  [% IF first_field_allow %]
    <input type="text" name="first_field" value="[% row.first_field %]">
  [% END %]
[% END %]

Later.

Mark.

-- 
  Mark Fowler
  Technology Developer
  http://www.indicosoftware.com/




Reply via email to