I have a model and a form created with ModelForm. I am using custom validation and I need access to the id of the record I am currently editing.
Is there a way to transfer a variable to the form by inserting a custom hidden field somehow or any other way?
I have a model and a form created with ModelForm. I am using custom
Share
You don’t need a hidden field. You can transfer variable from view to form:
View:
Form: