how do i implement this in django-form?
2/3: 2 is current picked amount of item, 3 is maximum
This form does not work with the model, it will send data after clicking to the redis server
So, how can i hide form under – n/N +
Consider having a look at: django.forms import widgets, inlineformset_factory
This would be valuable based on your use case but it depends on how you define your code.
2
Answers
Here I tried to solve your requirement
models.py
form.py
Rendering form in Html
Output Becomes like this
NOTE – Here I wrote javascript for handle + and – buttons.buttons work by targeting the name of the Number Input
Consider having a look at:
django.forms import widgets, inlineformset_factory
This would be valuable based on your use case but it depends on how you define your code.