disabling autocomplete widget from controller

0 views
Skip to first unread message

juxstapose

unread,
Dec 11, 2006, 12:12:25 PM12/11/06
to TurboGears
Hello,

I am trying to disable the autocomplete widget's text field in the
controller.
I have tried disabled = True and disabled = 'disabled' as values.
Am

#controller
return dict(value=dict(text=textvalue,attrs=dict(disabled=disabled)))

#kid template
${acfield.display(value=value)}

Thanks,
-Mike

Alberto Valverde

unread,
Dec 11, 2006, 2:57:04 PM12/11/06
to turbo...@googlegroups.com

Try this:

#controller
return dict(value=dict(text=textvalue), opts=dict(attrs=dict(text=dict
(disabled="disabled"))))


#kid template
${acfield.display(value=value, **opts)}

Alberto

juxstapose

unread,
Dec 11, 2006, 5:19:46 PM12/11/06
to TurboGears
That did the trick!

Thanks,
-Mike

Reply all
Reply to author
Forward
0 new messages