a radio.widgets can be used in a show_if condition ?

15 views
Skip to first unread message

ATeo

unread,
Dec 9, 2014, 2:12:14 AM12/9/14
to web...@googlegroups.com

hi, I have problems with show_if and radio.widgets
it would seem that a field whit widget = SQLFORM.widgets.radio.widget can not be used in a show_if condition.
in the following code, db.t_sezioneii.d0102=='1' not work
but db.t_sezioneii.d0104=='3' is ok 

there is a bug or i make something wrong ?

Tanks


db.t_sezioneii.d0102.label = "Sesso"
values = (
(1, "Maschio"),
(2, "Femmina")
)
db.t_sezioneii.d0102.requires = IS_IN_SET(values)
db.t_sezioneii.d0102.widget = SQLFORM.widgets.radio.widget

db.t_sezioneii.d0103.label = "Data di nascita"
db.t_sezioneii.d0103.show_if = (db.t_sezioneii.d0102=='1')

db.t_sezioneii.d0104.label = "Luogo di nascita"
values = (
(1, "In questo comune"),
(2, "In un altro comune italiano"),
(3, "All'estero")
)

db.t_sezioneii.d0104.requires = IS_IN_SET(values)
#db.t_sezioneii.d0104.widget = SQLFORM.widgets.radio.widget

db.t_sezioneii.d010401.label = "specificare lo stato estero"
db.t_sezioneii.d010401.show_if = (db.t_sezioneii.d0104=='3')
Reply all
Reply to author
Forward
0 new messages