There is some example script here which may help with the idea - both a setup for countries and subdivisions with Ajax and also a couple of range controls for urgency and importance where I then backfill the values into form fields for the actual values. As far as I am aware web2py does not have a range widget so this added another field and then wrote the value back.
https://github.com/DonaldMcC/gdms/blob/master/views/answer/answer_question.js this is loaded by answer_question.html in the same folder Regards Donald On Thursday, September 27, 2018 at 8:25:11 PM UTC+1, Dave S wrote: > > > > On Thursday, September 27, 2018 at 5:28:50 AM UTC-7, Rahul wrote: >> >> Hey All, >> This is essential - I can do what Donald has said but I want to >> do it at runtime. >> > > Why would you not consider jQuery to be "at runtime"? He mentioned it in > the context of setting the focus events, but it is a much richer toolset > than that. It runs on the client (browser) side, but can send AJAX > requests to the server. > > It would also be helpful when I try to implement say for example select a >> country from drop down and then populate states as per the country selected >> in another dropdown. may more use cases like that including calculations >> like age by selecting date fro date widget and populating years based on >> selected date in another field. I think these use cases are pretty valid >> and have seen them in a lot of web apps (typically aspx, php and java/jsp). >> How I achieve it in web2py with SQL forms or CRUD forms is what I am >> looking for. >> >> Regards, >> Rahul >> >> > /dps > > -- 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.