In order to set the value for a HiddenField in toscawidget, the only parameter I've found useful is 'default' (surprisingly, parameter 'value' in toscawidgets doesn't represent 'value' in html). However, the only way I could get it working is at the time of field creation:
class myForm(TableForm):
class fields(WidgetsList):
myhiddenField = HiddenField(default='old_value')
However, I need to be filled in runtime, or in other words, I want my controller to change the value of the hidden field in runtime. but it seems impossible, and
child_args=dict(myHiddenField = dict(default = 'new_value'))
doesnt seem to be working.
Normally, it should be sufficient to supply the value in the options dict when you render the form in your template.
No need for
child_args
here.