﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36212	How about providing type safe access to form field data?	Justin Black		"Right now only cleaned data is acessed in a dict in python.
This means that type hcecking code does not know the type of that dict unless it is described as a typeddict.
How about providing type safe access to form field data?


{{{
class FormOptions(forms.Form):
    prompt = forms.CharField(widget=forms.Textarea)
    n = forms.IntegerField(min_value=1, max_value=10, initial=1)

form_options = FormOptions({'prompt': 'a', 'n': 2})
}}}

one could access it as:
form_options.prompt.cleaned_data
or
form_options.prompt

This would allow code to access type safe values for a form in python.
"	New feature	closed	Forms	5.1	Normal	wontfix	form, field		Unreviewed	0	0	0	0	0	0
