Topic: Lightbox in a form

jouvrard pro asked 4 years ago


Hello,

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... :)

https://mdbootstrap.com/snippets/jquery/furax/1083662

Thank for your help.

Jerome


Adam Jakubowski staff answered 4 years ago


Hi,

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.

Best,

Adam


jouvrard pro answered 4 years ago


Ok I understand but it's a little problem for me. :) I'll find an other solution.

Thanks!

Jerome



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.8.8
  • Device: All
  • Browser: All
  • OS: All
  • Provided sample code: No
  • Provided link: Yes
Tags