This assumes you have followed the directions in the article on how to add a Lighbox pop-up box. In this article, I will show how you can use a button to trigger the pop-up box. First, add the following code to the BODY tag in your markup.
Next, we will create a form, and place both a button and a Lightbox image inside the form. Notice ID Error1a is inside the A tag. The ID in the onclick event must be the same as the ID in the A tag.
<form method="post" action="#"> <a id='Error1a' href='error1a.jpg' target='_self' rev='wplightbox~#~~#~'> <button> click here </button> </form>
This example is practical when you need to display an error message when something goes wrong. For example, your form could have a limit to only allow 8,000 characters max. If more than 8,000 characters are in the input data, then we can trigger an error to appear.