Hmmm ... I may want to rethink the db and interface design a bit. There are only 4 items that the operator needs to enter at the beginning of the test session: a name, an equipment identifier, an ip address, and a port number. There are not all that many possible values for any of these items (except the ip address).
It might make or sense for me to present a sequence of forms, one for each item. If the operator tries to enter something not in the db, I could redirect to a page that asks for confirmation and does the insert. Is there a way to access the value they tried to enter within the form.errors clause? Thanks! Mike On Jun 29, 2:30 pm, mdipierro <[email protected]> wrote: > something like this > > def mywidget(field, value): > return INPUT(_name='field', _id='table_field', > _class='fieldtype', _value=value) > db.table.field.widget=mywidget > > but in your case mywidget should return a table containing a select > box obtained from selecting the records and an entry field (to add an > option). > This is not too easy although possible. > > Massimo > > On Jun 29, 1:23 pm, MikeEllis <[email protected]> wrote: > > > Massimo, > > Thanks for the quick reply! Yes, it's the same field I need to > > validate. Can you steer me toward docs and/or examples of creating my > > own validator and widget? (I have a copy of your manual). > > Mike > > > On Jun 29, 2:16 pm, mdipierro <[email protected]> wrote: > > > > It is possible but you would need to create your own validator and > > > wdget for that. > > > > Is the "unique items in a given field" the same field you need to > > > validate? > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

