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
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
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
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"
@ 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
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}}:
>>
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
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
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
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
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
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
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
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
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());
>
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,
16 matches
Mail list logo