django-bootstrap-modal-forms
django-bootstrap-modal-forms copied to clipboard
Add custom javascript code in modal forms
Rather than a question or a bug report, it would be a suggestion that can be helpful for the users.
Although modal forms look good but I want to add my custom javascript code that is not possible. Like if I want to pass some value from the base page to the popup after is get loads.
I have to make change in forms.js file to make it happen.
But it would be good if these can be customised too easily.
Correct me if I am wrong. Thanks
@devkapilbansal Can you please accurately define your use case and other possible use cases for your proposed functionality?
@trco recently I was building an e-commerce project where it was needed. I had some information of the user on my main page and what I want was to fill my form with that information. I want these forms to have an additional area for extra code that can be triggered after form is loaded successfully.
Custom JS code can be added to the modals as described in this issue https://github.com/trco/django-bootstrap-modal-forms/issues/158. This information will be added to the docs.