Need a modal form on a button click

2 replies · opened Mar 16, 2020

SswevenservicesMar 16, 2020

I went through the documentation and I only could find there the code to load modal on page load. I'm looking to show modal on a button click event. Also I want to control that how big the modal should be as we do in bootstrap.

Hope you'd get my problem. Also it will be a lot easier if you could send me the code here. Thanks.

SSemicolon WebSTAFFMar 16, 2020

Hello,

  1. It is definitely possible to Trigger the Lightbox using a Button, simply use the data-lightbox="inline" function. An example is already provided in the lightbox.html Template. Code:

[Trigger Modal](#myModal1)

Simply change the href="#myModal1" Value according to your Modal's ID.

  1. If you use the following code as an example for the Modal:

	
		
			
				[](#)
			
			Responsive LayoutAdapts well on Devices
		
		
			[Don't Show me Again](#)
		
	

Simply change the max-width: 500px; Value and this will make your Modal Wider.

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

SswevenservicesMar 17, 2020

Thank you so much, it worked perfectly fine

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard