[Zope] Calling form elements by name

Bill Anderson bill@noreboots.com
Fri, 27 Oct 2000 09:17:05 -0600


Danny William Adair wrote:
> 
> I should have posted your version, it's more explicit:
> 
> -------------------------------------------
> <dtml-in Items sort=Position>
>   <dtml-let Prefix="'FormElement_'"
>             thePos="_.str(Position)"
>             nameAsAString="Prefix+thePos">
>     <dtml-var nameAsAString><br>
>     <dtml-var "_['FromElement_1']"><br>

I believe I see why this doesn't work:

Try changing:
     <dtml-var "_[nameAsAString]"><br>
To:
     <dtml-var "_['nameAsAString']"><br>

Otherwise, it will try to find a variable named whatever is in the
variable nameAsAString.

--
E PLURIBUS LINUX