There are two SingleSelectField
s in a form, say Select2SingleSelectField1
and Select2SingleSelectField2
. The values of both fields are retrieved from DB. The content of Select2SingleSelectField2
depends on the selected value of Select2SingleSelectField1
.
In the controller how to capture the value of Select2SingleSelectField1
? Could anyone help with this? Thanks.
I am using Turbogears 2.3.3 and Toscawidgets 2. There is no documentation about the parameters on Toscawidgets website. Nor is there on Turbogears website. The only piece of information is Toscawidgets 1's AutoCompleteField
example http://turbogears.org/2.0/docs/main/ToscaWidgets/Cookbook/AutoComplete.html.
You can capture the event by setting the parameter completionURL
.
from tw.jquery.autocomplete import AutoCompleteField
autoField = AutoCompleteField(
id='myFieldName',
completionURL = 'fetch_states',
fetchJSON = True,
minChars = 1)