That exactly one of my point about future of web2py and Massimo's experimentation like w3 and more recently DBAPI ( https://groups.google.com/d/msg/web2py-developers/jd7W_XS92aw/pZYzX07jAQAJ)
Here : https://groups.google.com/forum/#!msg/web2py-developers/x23GReU0McM/5kX42ft-PAAJ So, what you ask, modifying validator and return a new select element with new validations properties is not possible for now in web2py to my knowledge... The only way I can se you could make it works right would be to create a custom validator in the which you will write the logic you need in order for it behavior to change following and ajax call depending of some available value in the select for instance... A lot of work. The consequences of this is that it is not possible to create a truelly dynamic form with web2py as the form is created and processed server side... That because you can't modified the property of the field validator base on value of other fields for instance... It can be done as I explain by create custom validator somehow with a lot of work and for custome purpose... But let say you have to make some field (and validator) accepting empty value when a certain value is selected in another field it is actually difficult to do and you have to leave the field at IS_EMPTY_OR(IS_IN_DB(...)) which is not interresting as some fields may end empty because you enforce mandatory field base on data input in other fields. So you need to rely on heavy jQuery script to achieve dynimic form... Richard On Fri, Aug 5, 2016 at 2:05 PM, Bernardo Leon <bbernardol...@gmail.com> wrote: > It seems to be an interesting library but it is kind of expensive from > what I see and I think it does not integrate with web2py, at least not with > SQLFORM.crud. Thanks for the suggestion anyway! > > > El viernes, 5 de agosto de 2016, 12:57:40 (UTC-5), Ron Chatterjee escribió: >> >> http://demos.telerik.com/kendo-ui/dropdownlist/cascadingdropdownlist >> >> might help >> >> On Friday, August 5, 2016 at 1:28:01 PM UTC-4, Bernardo Leon wrote: >>> >>> No, I am trying to get the cascade dropdowns working. >>> >>> I want to make an AJAX call from the parent dropdown AND refresh the >>> child >>> >>> El viernes, 5 de agosto de 2016, 12:23:04 (UTC-5), Antonio Salazar >>> escribió: >>>> >>>> Are you saying you managed to cascade the dropdowns, or just make an >>>> AJAX call from the parent dropdown without refreshing the child? >>>> >>>> On Friday, August 5, 2016 at 11:28:44 AM UTC-5, Bernardo Leon wrote: >>>>> >>>>> Hi, I have an SQLFORM.grid form and when I am inserting data I want to >>>>> make the selectors work in cascade. I have seen some recipies where they >>>>> create by hand the form using plain html and throw some jQuery in the >>>>> middle but I dont like it, I like the cleaness of web2py so I am looking >>>>> for a cleaner way to accomplish this. >>>>> >>>>> So far I am trying with ajax request and I have been able to call a >>>>> function in my controller passing the id of the parent selector to finally >>>>> change the child's selector IS_IN_DB validator. That was my idea, but it >>>>> seems I cannot change the validator from de controller, only from the >>>>> model; so is there a way to reload the model within an ajax request so I >>>>> can change the behavior of my form at runtime? Is there a better/cleaner >>>>> way to accomplish this? >>>>> >>>>> Thank you! >>>>> >>>> -- > 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. > -- 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.