Topic: Lightbox in a form
I have a form where I can upload an image, and change it after.When I go in a previously created item I can see my image and I would like to have a lightbox when I click on it.It works... partially. :)
When I click on the image it opens like a charm, but when I close it by clicking on the top right cross, it posts my form, as if I had clicked on the "save" button.
You can find an example with my snippet, it's created with your original code, I just changed the "div.row" for "form.row".
- Click on an image
- Close it by clicking on the top right cross
- After few seconds, you'll see the problem... :)
Thank for your help.
Lightbox is not created to build it in the forms and that this type of functionality was not provided, so if you want to use it this way, you must ensure that forms are not sent by using Java Script.
Ok I understand but it's a little problem for me. :) I'll find an other solution.
- User: Pro
- Premium support: No
- Technology: jQuery
- MDB Version: 4.8.8
- Device: All
- Browser: All
- OS: All
- Provided sample code: No
- Provided link: Yes