[Zope] Calling form elements by name

Danny William Adair Danny@Adair.net
Thu, 26 Oct 2000 09:53:34 +0200


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>
    <dtml-var "_[nameAsAString]"><br>
  </dtml-let>
</dtml-in>
-------------------------------------------

does not work either. Anyone?

tia, Danny


-----Ursprüngliche Nachricht-----
Von: Steve Drees [mailto:drees@the-bridge.net]
Gesendet: Mittwoch, 25. Oktober 2000 22:24
An: Danny@Adair.net
Betreff: RE: [Zope] Calling form elements by name



> <dtml-in Items sort=Position>
>
> <dtml-let Prefix="'FormElement_'"
>           thePos=Position
>           nameAsAString="Prefix+thePos">
> <dtml-var nameAsAString><br>
> <dtml-var "_['FormElement_1']"><br>
> <dtml-var "_[nameAsAString]"><br>
> </dtml-let>
>
> </dtml-in>

is Position a string?


I'd try

<dtml-in Items sort=Position>
  <dtml-let Prefix="'FormElement_'"
            thePos="_.str(Position)"
            nameAsAString="Prefix+thePos">
    <dtml-var nameAsAString><br>
    <dtml-var "_['FromElement_1']"><br>
    <dtml-var "_[nameAsAString]"><br>
  </dtml-let>
</dtml-in>


>