You only use ajax if the option of field2 depend o selection for
field1 and you always end up with usability problems when field1 and 2
are in the same form (because of the ajax delay).

If the options depend on the logged in user it can be done without
ajax. How depends on details.


On 9 Lug, 09:06, Johann Spies <[email protected]> wrote:
> I have a related query.
>
> > On Jul 9, 12:35 am, David Marko <[email protected]> wrote:
> >> You can use full DAL query in IS_IN_DB validator e.g.
> >> IS_IN_DB(db(db.children.sex=='M'),'children.id','%(name)s' )
>
> I want the result of IS_IN_DB to be part of my access control measures
> and dependent on who is logged in and what is typed in another field
> in the form.
>
> Example:
>
> X is logged in and has access to say 8 of about 50 options in the database.
>
> In the form the first field should make only  some of the 8 options
> available in the second field.
>
> I suspect it can be done with AJAX but I have now experience in using
> javascript tools.
>
> Has anyone done that before?
>
> Or should I have two forms where the content of the second is
> determined by the submission of the first?
>
> Regards
> Johann
> --
> "Finally, brethren, whatsoever things are true,  whatsoever things are
> honest, whatsoever things are  just, whatsoever things are pure,
> whatsoever things are lovely, whatsoever things are of good report; if
> there be any virtue, and if there be any praise, think on these
> things."    Philippians 4:8

Reply via email to