hey there,

I'm trying to access the data value of the form in HTML, but can't
seem to figure out how to do this? (if it's possible?)

I'm not interested in have the form out build the widget with the
HTML ... i just want to show it's value, but build the HTML myself ...
I'd still like to use the form for validation purposes.

Thx ahead of time!

Example:
class UserForm(forms.Form):
  username = forms.CharField(label='Username',
widget=forms.TextInput())

CODE:
<snippet>

ctx['form'] = UserFBForm(initial={ 'username' : 'Joe User'})
return render_to_response('user.html', ctx)

</snippet>

HTML:
<snippet>

<input type="text" name="username" id="id_username"
value={{ form.username.data }} class="form-data"  />

</snippet>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to