Django 2.1.
I have this code:
class AnswerInline(admin.StackedInline):
model = Answer
form = AnswerForm
fields = ("question_answer_type", "answer_plain")
readonly_fields = ("question_answer_type",)
def question_answer_type(self, row):
return row.question.answer_type
This works and I have new field "question_answer_type" in inline instances.
Now I want to make this field hidden. (I want use its content in
JavaScript.)
I know there is forms.widgets.HiddenInput (or forms.HiddenInput ???) which
I should probably use. But how to use it?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/fb098587-51c6-4586-b3d0-cf5d376700e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.