I am working on a form which inserts data into five different tables. To prevent the user from filling in the entire form and after form submission finding that the object already exists, I would like to check the existence of an object before hand based on two form fields. These are the relevant bits of the form:
def create_form(): form=SQLFORM.factory( Field(...), Field(...)) ... form[0][2][2].insert(0,A('already in database?',_onmouseover="this.style.cursor='pointer';",\ _onclick="javascript:details('%s')"%URL(r=request,f='retrieve',args=[document.getElementById(kvk_number).value, \ document.getElementById(subdossiernumber).value]))) ... if form.accepts(request.vars,session): ... elif form.errors: ... return dict(form=form) ... args=... should get the values entered in the fields named kvk_number and subdossiernumber, the code above doesn't work, what is the correct syntax to get these values and pass them as arguments to the retrieve function? Kind regards, Annet.