Hello,

I created my model with self reference, something like this:

db.define_table('t_step', Field('name'), Field('next_step', 'reference t_step')


then I prepared SQLFORM with field validator IS_IN_DB:

IS_IN_DB( db,'t_step.id',db.t_step.name)

It works properly but I would like to add modification to this: remove the
current (edited) item from dropdown rendered on page.

My goal is to prevent the creation of reference to itself.

I see 2 solution:
- modify validator (how?)
- remove element from dropdown with JQuery

Is there simplest solution?

Regards,
Tomasz

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to