Re: [web2py] Re: New feature in trunk conditional fields RFC

2017-01-06 Thread Meinolf
Hello How do i implement these conditional fields in a custom auth table? I tried the following but does not seem to hide the grade field. #Start of definition of custom Auth tables to be used instead of the default ones. auth = Auth(db) db.define_table(auth.settings.table_user_name,

Re: [web2py] Re: New feature in trunk conditional fields RFC

2013-06-04 Thread Massimo Di Pierro
Uploading to trunk. Please check it. On Tuesday, 4 June 2013 16:25:15 UTC-5, Niphlod wrote: > > fix for that. > > > function web2py_show_if(target) { > var triggers = {}; > var show_if = function () { > var t = jQuery(this); > var id = t.attr('id'); > t.attr('value', t.val()); >

Re: [web2py] Re: New feature in trunk conditional fields RFC

2013-06-04 Thread Niphlod
fix for that. function web2py_show_if(target) { var triggers = {}; var show_if = function () { var t = jQuery(this); var id = t.attr('id'); t.attr('value', t.val()); for(var k = 0; k < triggers[id].length; k++) { var dep = jQuery('#' + triggers[id][k], target); var

Re: [web2py] Re: New feature in trunk conditional fields RFC

2013-06-04 Thread Niphlod
BTW2: doesn't work on LOADed forms. -- --- 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://gr

Re: [web2py] Re: New feature in trunk conditional fields RFC

2013-06-04 Thread Niphlod
yep. BTW: this just hides the field. if someone fills the "bb" field, it gets sent with the form anyway. On Tuesday, June 4, 2013 10:55:31 PM UTC+2, Ramos wrote: > > Show if =visible when > No dia 04/06/2013 21:51, "Niphlod" > > escreveu: > >> it works, but a few hiccups with the examples post

Re: [web2py] Re: New feature in trunk conditional fields RFC

2013-06-04 Thread António Ramos
Show if =visible when No dia 04/06/2013 21:51, "Niphlod" escreveu: > it works, but a few hiccups with the examples posted > > def index1(): > """ shows bb only if aa is checked """ > db.define_table('thing', Field('aa','boolean'),Field('bb')) > db.thing.bb.show_if = db.thing.aa==T