Correct! It works now, thanks!
[image: Screenshot at 2011-12-24 00:29:10.png] Best Regards, Thomas On Sat, Dec 24, 2011 at 12:26 AM, Anthony <abasta...@gmail.com> wrote: > In order for the validators for a reference field to be created > automatically, I think the referenced tables have to be defined first > (otherwise the validators cannot be defined because they refer to the > referenced table). So, try defining db.comment after the other tables that > it references. > > Anthony > > > On Friday, December 23, 2011 9:16:15 AM UTC-5, Thomas Dall'Agnese wrote: >> >> Sure. >> >> db.define_table('comment', >> Field('user', type='reference auth_user', >> label=T('User')), >> Field('date_added', type='datetime', >> label=T('Date Added')), >> Field('error_type', type='reference error_type', >> label=T('Error Type')), >> Field('balise', type='reference balise', >> label=T('Balise')), >> Field('content', type='string', notnull=True, required=True, >> label=T('Content')), >> auth.signature, >> format='%(content)s', >> migrate=settings.migrate) >> >> ##############################**########## >> db.define_table('balise', >> Field('name', type='string', notnull=True, required=True, >> label=T('Name')), >> auth.signature, >> format='%(name)s', >> migrate=settings.migrate) >> >> db.define_table('balise_**archive',db.balise,Field('**current_record','reference >> balise',readable=False,**writable=False)) >> >> ##############################**########## >> db.define_table('error_type', >> Field('name', type='string', notnull=True, required=True, >> label=T('Name')), >> auth.signature, >> format='%(name)s', >> migrate=settings.migrate) >> >> When I add a COMMENT, I would like to see a <select> for the USER, BALISE >> and ERROR_TYPE. >> However, only the USER is correctly displayed as a <select>. >> BALISE and ERROR_TYPE are text inputs: >> >> >> <https://lh6.googleusercontent.com/-cgqyYdKFm6Q/TvSNJGc5paI/AAAAAAAASRg/Fi5E9mcPv4s/s1600/Screenshot%252520at%2525202011-12-23%25252023%25253A15%25253A05.png> >> >> >> What am I doing wrong? >> >>
<<Screenshot at 2011-12-24 00:29:10.png>>