Nice video.. can you please do the dynamic form on the create view because every time the dynamic form is generated on the update view, there is other prefillled fields.
How do you ensure that counts you update via setAttribute actually get passed in the request? The add button will increment the id_forms-TOTAL_FORMS, but when I print the request in python it still says '0'.
I have a query.. I am also using Javascript to add element using hx-target and the element I am adding has hx-get in it ... so the dynamic addition of element using javascript is working but the hx-gext inside that dynamic element is not working
What about buttons to *remove* ingredients? I assume that any ingredients which appear *after* the one being deleted would need to be resequenced, so there are no gaps? (e.g., form-4-* would become form-3-*, etc.) Also: what if you have two formsets on the same page? Can you customize the names and IDs of the controls in the management form, so they don't collide?
Hey, Sorry sir Justin Mitchell. But sometimes I kind of feel so busted and punctured knowing about, you know so many things. In Deep Sorrow, Writing I'm feeling jealous really a lot...
@@CodingEntrepreneurs So happy to see your reply, Sir. Thank you very much Sir for giving your valuable time and words. I won't forget this reply for my whole life. It means a lot to me. Keep up the Great Work Sir.
THe string substitution at 22:20 really threw me off since it doesn't use quotes ( ' ' ) and instead uses backquote ( ` ` ). Why is that? For anyone who might have the same issue, backquote is the character on the same key as tilda (~).
I don't know why are you so underrated. But you explained really well. Good job, bro! Keep it up.
Underrated? First, what a rude and mindless thing to say. Second, it's just not true so you must be conversing with some A-holes.
Great list of videos! Django should provide some JS helpers for adding new formsets dynamically imo.
There’s probably a Django package (non-official) that does this.
Great video. How can we delete extra forms now? Like in the django admin inline?
THANK FOR THE TUTORIAL BROTHER 💕
This thing saved my life bro
Thank you for this tutorial, I was trying to implement something similar
Great stuff. Thanks
Nice video.. can you please do the dynamic form on the create view because every time the dynamic form is generated on the update view, there is other prefillled fields.
i have the same question !!!
You are incredible buddy
Is there a way in the ' for fields in self.fields ' to determine the type of the field so you can update the CSS based on each type i.e. checkbox etc?
How do you ensure that counts you update via setAttribute actually get passed in the request? The add button will increment the id_forms-TOTAL_FORMS, but when I print the request in python it still says '0'.
Django doesn't do field validation for dynamically added forms. how do I do validation?
Can you do tutorial on how to pre populate data of the forms with formset
I have a query.. I am also using Javascript to add element using hx-target and the element I am adding has hx-get in it ... so the dynamic addition of element using javascript is working but the hx-gext inside that dynamic element is not working
Hello! Can you do also a delete product line function ?
Thanks for the great tutorial. Could you also show us how to add ingredients with a new recipe in one go using htmx? Thank you
Thank you so much!
Hello, thanks for the code! But, how to delete ingredient-form?
What about buttons to *remove* ingredients? I assume that any ingredients which appear *after* the one being deleted would need to be resequenced, so there are no gaps? (e.g., form-4-* would become form-3-*, etc.)
Also: what if you have two formsets on the same page? Can you customize the names and IDs of the controls in the management form, so they don't collide?
Yes.. When you remove anyone even from the middle or last one... Simply re arrange it to 0 to end
What might look strange: declaring of formCopyTarget as 'const' and then appending to it. This works for arrays in JS.
awesome !!
Hello, Can you give me tutorial to delete inline form like django admin ?
Hey, Sorry sir Justin Mitchell. But sometimes I kind of feel so busted and punctured knowing about, you know so many things. In Deep Sorrow, Writing I'm feeling jealous really a lot...
It takes time my friend. It took me time and a LOT of frustration
@@CodingEntrepreneurs So happy to see your reply, Sir. Thank you very much Sir for giving your valuable time and words. I won't forget this reply for my whole life. It means a lot to me. Keep up the Great Work Sir.
THe string substitution at 22:20 really threw me off since it doesn't use quotes ( ' ' ) and instead uses backquote ( ` ` ). Why is that?
For anyone who might have the same issue, backquote is the character on the same key as tilda (~).
Oh yeah. That’s modern JavaScript
Very similar to f-strings in python
Ah ok just a different way it's done pretty much. Thanks