Hi,
I am trying to bind the results of a database query to a FormKit SelectField. Here is my code:
################
newForm.addField(Fields.SelectField('groupType',label="Group Type"))# get group types using a SQLObject select() method groupTypes = GrpType.select(orderBy=GrpType.q.description)
pr('''\t<tr><td>%s</td>''' % newForm.groupType.label())
pr('''\t<td>%s</td></tr>''' % newForm.groupType.tag())
for theGroupType in groupTypes:
newForm.groupType.addChoice(theGroupType.id,theGroupType.description)
################The select field renders but there is no data in the field. I can print theGroupType.id and theGroupType.description to an HTML table without a problem so I know I have data. What am I missing?
Regards,
Clifford Ilkay Dinamis Corporation 3266 Yonge Street, Suite 1419 Toronto, Ontario Canada M4N 3P6
Tel: 416-410-3326
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss
