* Tuttle, Gene <cetuttle@rottlundhomes.com> [2004-08-16 21:44]:
I am using this code to display a form
<center> <table border="10" bgcolor="#999966" cellspacing=0 cellpadding=0>
<!--- get a list of all the fields in the form ---> <dtml-in "AddBuyerForm.get_fields()">
<!--- rename each sequence item to field so they can be used more easily ---> <dtml-let field=sequence-item>
<tr> <td align="right"><dtml-var "field.get_value('title')">: </td> <td><dtml-var "field.render()"></td> </tr>
</dtml-let> </dtml-in> <tr> <td></td> <td> <input type="submit" value="Submit" name="submit"> <input type="submit" value="Done" name="done"> </td> </tr> </table>
I want to display some data in some of the forms. the line: <td><dtml-var "field.render()"></td> will do this. How do I know what field is being processed. Given I have a query (ZSQL Method) and returning values from fields with the same names as the fields in the form. I need to match them up. Can some help me?
If they have the same names then you should be able to render the correct value for a field by subscripting the record with the field.id: <dtml-var "field.render(record[field.getId()])"> -- Roché Compaan Upfront Systems http://www.upfrontsystems.co.za