-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clear/deleting does NOT clear form value #102
Comments
I've tried to reproduce the problem in my minimal example (https://github.com/christianwgd/date_time_picker_sample). Everything is working as expected. Maybe you can compare the relevant code to find out what the difference is or extend the example to show the problem in detail. |
Not sure, what the images should tell us. Could you please add some comments? Thanks |
Yes, I think we all had understood, what your problem is. But we want to find out why. So, did you compare your code to that one in the sample? Can we see your code (view, form and template)? It's really hard to help you without any clue... |
First of all: It would be much easier to read, if you would paste the code as text and not as images, thanks. A hint on your model form: As far as I know, the required property is only for simple forms (forms.Form). For model forms this is dependent on your model fields. These are optional in your form, if they have the "blank=True" property set. I'm not sure if you can override that with the "required" option. |
No #98 is not solved -- no they are not related; the issue with #98 is the CSS doesn't account for viewport size of embedded templates. It should be pretty clear that the form I sent is a model form that is directly tied to the model view/update view. The use of inline formsets here are pretty irrelevant and should be able to replicate with a simple view/form -- I only grabbed the exact example I dealt with when the page came up -- the issue seems to be that on page render of an initial value being added to the widget, the only time the value is touched is when it is "changed" to a new value, not changed to a null value. model forms are able to be modified in way I have done it, as the super().init() loads the model definition, and the subsequent override of the required attr is then changed as if the model definition included blank=True -- this does not work for non nullable fields, but does work if the field is nullable as this field is. git does Not like djangos template engine. -- so I won't be able to upload the template. And even the view/form give issues. ` class invoiceTechnicianDetailList(UpdateView):
` `
` |
I can't reproduce the problem on widget's demo website, @jjulian91 I'd suggest check the demo website to figure out what are you doing different if you still have the issue. |
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Clear button or deleting value from form to delete the value in the javascript.
Setup Information (please complete the following information):
[x] I have followed the configuration instructions and checked out the
common error troubleshooting page.
The text was updated successfully, but these errors were encountered: