Hello,
I have a form generated like this :
SQLFORM.factory(db.table1, Field('name','type',requires='something',
...), Field('name1','type',requires='something', ...), etc.)
Base on the value entered for a field in the db.table1 I want to set
predefined (or default) values stored in database to the appropriate custom
fields (name, name1) included in the form with SQLFORM.factory.
Now, I am not sure, if web2py ajax if enough for the task or I will need
$.ajax...
I have to send to web2py controller function the value entered by the user.
I thought it could be easier to have callback function, independent from
the function that generate the form, that will only return the list
predefined defaults values base on the user input, then write a little
jquery loop to set those defaults values in the form.
I am not sure web2py ajax can handle this. Also, I don't know how to get
data pass to the "callback" function with $.ajax(..., data:{key:value})...
Thanks.
Richard
--