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).ready( function () {
    if (jQuery('#errors').html().length != 0) {
        var errors = jQuery.parseJSON(jQuery('#errors').html());
        jQuery.each(errors, function (key,value) {
            //console.log(key+' ___ '+key.substring(0,6)+' ___ '+value);
            if (key.substring(0,6) == 'child_') {
                console.log(key+': '+value);
                jQuery('#sheet_children_'+key).parent().append('<div 
class="error_wrapper"><div class="error" id="'+key+'__error" 
style="display:inline-block;">'+value+'</div></div>');
            }
        });
    }
    console.log("jQuery.document.ready");
});
</script>
{{end}}

bunch of other code and at the very end of the view add:

{{import json
if form.errors:
    =DIV(json.dumps(form.errors), _id="errors", _style="display:block;")
    pass}}

to make sure the errors Storage gets sent back to the client for the above 
javascript code to scan and add to the form.

anyway, not a big deal and works very nicely.  lucas

-- 
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.

Reply via email to