> Actually this is a good question that I have a problem with myself all
> of a sudden.
>
> What if the options for select fields is dynamically obtained for each
> invocation of the form?
There are two options:
- pass a callable to options. It will be evaluated each time the form
is rendered.
- pass the options as parameter to the form when rendering it:
${form.display(value, options={'fieldname' : <optionlist/>})}
See this:
http://groups.google.co.kr/group/turbogears/browse_thread/thread/15f0585b4604405b
> My other question that has just bitten me on this is the format
> parameter for a DatePicker widget. At the moment I specify it in the
> form which, as normal, gets constructed at load time. However, I need to
> set the date format dynamically according to the language of the current
> request.
This is actually a lack in the DateTimeConverter.
I personally have a patched version that allows format to be passed a
callable to allow what you want.
If I come to it, I'll send it to you tomorrow, as the code is at work.
Diez
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---