I concur with Oliver.
Obviously if your dynamic user_name is a variable, it would look like
this:
form=MyForm(initial={'user_name':user_name})
And of course, this is written in the view.
On May 12, 2:41 pm, oliver <[EMAIL PROTECTED]> wrote:
> I do it like this:
>
> def frommagic(request):
>
I do it like this:
def frommagic(request):
if request.POST:
process form
else:
from = MyForm(initial={'user_name': 'John Doe' })
works well in our quite complex 6 step booking form ..
On May 12, 9:37 pm, Mike Chambers <[EMAIL PROTECTED]> wrote:
> I have a project where I need to dyn
I have a project where I need to dynamically set the default values for
a form field. I have come up with the following solution, but wanted to
check here to see if anyone saw any problems with it:
MyForm
class MyForm(forms.Form):
user_name = forms.CharField(min_length=1, max_le
3 matches
Mail list logo