[web2py] Re: onvalidation error for nonSQLFORM but request.vars

2016-07-15 Thread lucas
hey everyone, i got it to work based on adding to the above code. it mimics the behavior of adding the little red error boxes to fields/vars that are not included in the original SQLFORM. here is what was added for anyone interested: under the view, i added: {{block head}} jQuery(document).r

[web2py] Re: onvalidation error for nonSQLFORM but request.vars

2016-07-14 Thread Anthony
SQLFORM is only going to deal with the parts of the DOM it generates based on fields it knows about. It's hard to say how you should display the errors without knowing how those input fields are generated in the HTML. Anthony On Wednesday, July 13, 2016 at 1:15:15 PM UTC-4, lucas wrote: > > so

[web2py] Re: onvalidation error for nonSQLFORM but request.vars

2016-07-13 Thread lucas
so what do you think? couldn't code be added to allow for the search and DIV(red error box) on the final html form/DOM regardless of if the field exists in the original SQLFORM? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: onvalidation error for nonSQLFORM but request.vars

2016-07-10 Thread lucas
this is not the complete code: def main(): msg = CAT() frm = SQLFORM.factory(db.case, db.sheet, buttons=btn) if frm.process(onvalidation=chk_1step).accepted: cidi = db.case.insert(**db.case._filter_fields(frm.vars)) frm.vars.case_id = cidi sidi =db.sheet.insert(

[web2py] Re: onvalidation error for nonSQLFORM but request.vars

2016-07-10 Thread Anthony
Please show some code. On Sunday, July 10, 2016 at 12:10:00 AM UTC-4, lucas wrote: > > hey everyone, > > under the onvalidation function, i can add errors for fields that are not > directly generated from an SQLFORM but from client side jQuery side. but > those fields are correctly still coming