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

2013-06-04 Thread Niphlod
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==True form = SQLFORM(db.thing) return locals() def index2(): """ show

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

2013-06-05 Thread Jose
Hello Massimo with custom.form not work {{extend 'layout.html'}} {{=form.custom.begin}} {{=form.custom.label.aa}}: {{=form.custom.widget.aa}} {{=form.custom.label.bb}}: {{=form.custom.widget.bb}} {{=form.custom.submit}} {{=form.custom.end}} José -- --- You received this

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

2013-06-05 Thread Massimo Di Pierro
works if you replace {{=form.custom.label.bb}}: {{=form.custom.widget.bb}} with {{=form.custom.label.bb}}: {{=form.custom.widget.bb}} there must a tag with class "___row" that delimits what should be hidden. On Wednesday, 5 June 2013 08:58:57 UTC-5, Jose wrote: > > Hello

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

2013-06-05 Thread Jose
El miércoles, 5 de junio de 2013 11:53:18 UTC-3, Massimo Di Pierro escribió: > > works if you replace > >{{=form.custom.label.bb}}: > {{=form.custom.widget.bb}} > > with > > >{{=form.custom.label.bb}}: >{{=form.custom.widget.bb}} > > > there must a tag with class "___row"

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

2013-06-05 Thread Niphlod
@ Massimo: just wondering. Wouldn't it be better if the "hidden" input gets disabled too ? -- --- 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

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

2013-06-05 Thread Massimo Di Pierro
right. {{=form.custom.label.bb}}: {{=form.custom.widget.bb}} does this work? On Wednesday, 5 June 2013 12:09:00 UTC-5, Jose wrote: > > > > El miércoles, 5 de junio de 2013 11:53:18 UTC-3, Massimo Di Pierro > escribió: >> >> works if you replace >> >>{{=form.custom.label.bb}}: >>

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

2013-06-05 Thread Jose
El miércoles, 5 de junio de 2013 20:32:37 UTC-3, Massimo Di Pierro escribió: > > right. > > >{{=form.custom.label.bb}}: >{{=form.custom.widget.bb}} > > >> >> No, does not work this becomes: Bb: -- --- You received this message because you are subscribed to the Google

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

2013-06-05 Thread Massimo Di Pierro
One more try: {{=form.custom.label.bb}}: {{=form.custom.widget.bb}} On Wednesday, 5 June 2013 18:56:16 UTC-5, Jose wrote: > > > > El miércoles, 5 de junio de 2013 20:32:37 UTC-3, Massimo Di Pierro > escribió: >> >> right. >> >> >>{{=form.custom.label.bb}}: >>{{=form.custom.widge

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

2013-06-05 Thread Massimo Di Pierro
I do not think so. I think there is a value in carrying on the values of hidden fields when editing a record. Otherwise their values may be lost. On Wednesday, 5 June 2013 13:24:36 UTC-5, Niphlod wrote: > > @ Massimo: just wondering. Wouldn't it be better if the "hidden" input > gets disabled to

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

2013-06-05 Thread Jose
El miércoles, 5 de junio de 2013 21:38:06 UTC-3, Massimo Di Pierro escribió: > > One more try: > > >{{=form.custom.label.bb}}: >{{=form.custom.widget.bb}} > > > it does work Jose -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group

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

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

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,