Questions tagged [django-formtools]

django-formtools is a collection of assorted utilities that are useful for specific form use cases.

django-formtools is a collection of assorted utilities that are useful for specific form use cases. You can install it using pip install django-formtools. Documentation can be found in here: https://django-formtools.readthedocs.io/en/latest/index.html

51 questions
2
votes
0 answers

Django Form: Hidden Field Error When going to next wizard: (Hidden field ) This field is required

I have tried couple of ways to avoid this error from view code and on django template as well. Also tried to popped out the fields as well but none are working and getting the same error every time(This field is required) . We are using step…
sks
  • 21
  • 2
2
votes
1 answer

How to implement Django Session Wizard with multiple templates

Im trying to implement a multi step form in django using the form wizard that comes with django-formtools and so far it steps through all the forms till the last one then instead of calling the done method, the page goes back to the first form. Some…
West
  • 2,350
  • 5
  • 31
  • 67
2
votes
0 answers

Django formtools, how to set wizard_view cookie expiration date?

I am using django formtools to split a long form. I want users to have the possibility to continue filling the forms after they logout/login to the site and after closing/opening their browser. However, the cookie set by formtools has an expiration…
kbr85
  • 1,416
  • 12
  • 27
2
votes
1 answer

How to make a selection button inside a multistep form wizard in Django that renders an output without proceeding to the next step?

I am new to Django and I am making a project with a multistep form using django-formtools. The problem is, in my step 2 form, I have selection fields that I need to pass in the backend to perform some calculations and then render the output. The…
Semb
  • 156
  • 2
  • 20
2
votes
1 answer

django-formtools, saving data between form steps

I am trying to create a multi-step form wizard using django-formtools. I have a main model called Report and several ModelForms as follows: class ReportFormP1(forms.ModelForm): class Meta: model = Report fields = [ …
motatoes
  • 828
  • 11
  • 26
2
votes
0 answers

Testing Django Wizard Views

I'm writing tests for my wizard using this excellent example from PyDoc.net. One of the methods in my TestCase is not returning the correct step in the wizard: class WizardTests(TestCase): wizard_step_data = ( { …
2
votes
0 answers

KeyError: 'wizard_activation_wizard'

I recently upgraded from Django 1.6.11 to Django 1.8.9, and installed django-formtools==1.0 as part of the process. I am getting this error, which does not point to a single line of my code. Has anyone come across this? Internal Server Error:…
1
vote
0 answers

Using django form wizard with allauth

Currently my user sign up process is implemented with allauth. Does anyone have any experience of how to make this a multipage process e.g. with form wizard from formtools? forms.py (stored at users/forms.py) class…
RobMcC
  • 392
  • 2
  • 7
  • 20
1
vote
0 answers

Django formtools Wizard done function not executed

(References: Django formtools done function not…
1
vote
0 answers

Make Django form choices depend on values submitted in a previous form

I'm using django-formtools to create a multi-step form wizard. I want to use data entered in the first step to call an API, then use the response data in the next step as a ChoiceField. This is what my code currently looks like: views.py from…
1
vote
0 answers

Using a custom form inside django wizard

How would I use a custom form to display inside the session wizard so when it goes through each step it displays the html for each form inside the signup.html. createUser.html {% extends 'base.html' %} {% block title %}Create User{% endblock %} {%…
Arundeep Chohan
  • 9,779
  • 5
  • 15
  • 32
1
vote
1 answer

Django customising template for form

SuspiciousOperation at /signup/ ManagementForm data is missing or has been tampered. Request Method: POST Request URL: http://localhost:8000/signup/ Django Version: 3.2.9 Exception Type: SuspiciousOperation Exception Value: ManagementForm…
Arundeep Chohan
  • 9,779
  • 5
  • 15
  • 32
1
vote
1 answer

Using value from URL in Form Wizard for Django

I'm trying to use this Form Wizard to design a multipage form in Django. I need to catch a value from the URL, which is a client's ID, and pass it to one of the Forms instance, as the form will be built dynamically with specific values for that…
rmdez
  • 41
  • 7
1
vote
1 answer

django - How can I prefill formset forms data using database query result?

I am creating a student attendance form where need to get details of student name, student class and Id from student model based on teacher selecting student class in one form. I have tried using initial by using for loop on query data to prefill…
pankaj
  • 38
  • 4
1
vote
1 answer

How to save multiple models with multiple modelForms in one django form-tools WizardView

Here's my scenario: I have two models: class Person(models.Model): # --- model fields --- class Qualification(models.Model): owner = models.ForeignKey(Person, on_delete=models.CASCADE) # --- other fields --- And Model forms: class…
Abedy
  • 361
  • 5
  • 17
1
2 3 4