Modal Element

25/01/2022

The Modal Element is a very vesatile Element, which can be used to display additional content via a popup window on a page. Modal boxes are hidden by default and can be triggered by a Menu item, a button element or a modal text / HTML link element, which can be either text or an image. Most of our other Elements can be used inside it, so you can organize your content however you prefer.

Read below for more information about the Modal Element, and watch the video below for a visual oveview.

This Button Opens A Modal Window!
View Element Demo Page!

Overview

How To Create A Modal

Step 1 – Add a Container to the page and choose a column layout.

Step 2 – Click the ‘+ Element’ button on the column to open the Elements window. Locate the Modal Element and click it to open the Options window. You can insert the Modal element anywhere on your page, as it will be hidden, but it has to be on the same page as the trigger.

Step 3 – In the ‘Name of Modal’ field, enter a unique identifier for your modal. For example, popup. Keep in mind that this same unique identifier will be used in your modal trigger which will be explained below.

Step 4 – Once you have done configuring the Element, remember to save your changes.

Step 5 – After setting up the Modal element, you then have to then setup a Modal Trigger (button, text link or image) on the same page, with the same matching unique identifier you added to the ‘Name of Modal’ field. See the section below for more instructions.

How To Create A Modal Button Trigger

Step 1 – Add a Container to the page and choose a column layout.

Step 2 – Click the ‘+ Element’ button on the column to open the Elements window. Locate the Button Element and click it to open the Options window.

Step 3 – Locate the ‘Modal Window Anchor’ field. Enter the exact unique identifier you entered into the ‘Name of Modal’ field in your Modal element. For example, popup.

Step 4 – Once done, click the ‘Save’ button. You can now view the modal on the front end of your site by clicking this button.

How To Create A Modal Text / HTML Link Trigger

Step 1 – Add a Container to the page and select your desired column layout.

Step 2 – Click the ‘+ Element’ button on the column to bring up the Elements window. Choose the Modal Text / HTML Link Element to open the Options window.

Step 3 – In the ‘Name Of Modal’ field, enter the exact unique identifier you entered into the ‘Name of Modal’ field in your Modal element. For example, popup.

Step 4 – In the ‘Text or HTML Code’ field, enter the text or content that will trigger the modal when clicked. For example, “Open this popup window for more details”. If you’d like to use an image, then enter the image tag. See below for an example.

Step 5 –  Once done, click ‘Save’ to add the Modal Text Link Element into the page content.

Step 6 –  You can now view the modal on the front end of your site by clicking the text or image you inserted.

Step 7 –  Once done, click ‘Insert’ to add the Modal Text Link Element into the WordPress Content Editor.

Step 8 –  Add the rest of your content as normal, then click ‘Save’. You can now view the modal on the front end of your site by clicking this text or image.

Copy to Clipboard

You can use a main menu item to launch your Modal as well. This is beneficial because it allows you to have a sitewide Modal with the same content on every page of your site. This could be used in a variety of ways, but one common method is to use it as a contact form Modal in conjunction with an Avada Forms shortcode.

Note: Since the Modal element needs to be on the same page as its trigger for it to work, you’ll need to be sure that your Modal Element shortcode is also added to a sitewide element. This most easily can be done by adding your Modal shortcode to a Global Header Layout Section (or if you are not using Layouts yet, you could alternatively put it in a footer widget). For information on generating shortcodes in Avada, please see our post here.

Step 1 – Navigate to the Appearance > Menus page in your WordPress admin. Edit the menu that you want to add your Modal menu item link to.

Step 2 – Add a “Custom Link” menu item to the menu and give it a name (the URL can just be “#”).

Step 3 – Now, on your newly added menu item, click the “Avada Menu Options” button.

Step 4 – Locate the “Modal Window Anchor” text field and add your Modal’s ID/Name which was added to the Modal element’s “Name of Modal” field. (If you’re using a Modal Shortcode, it will be the value added to the “name” attribute.)

Step 5 – Save the menu settings and check the frontend. If you’ve already created your Modal Element and added it to the page, it should now launch when your menu item is clicked.

Avada Website Builder

858,309 Businesses Trust Avada

Get Avada
Avada Website Builder

858,309 Businesses Trust Avada

Get Avada
Avada Website Builder

858,309 Businesses Trust Avada

Get Avada

Element Options

Location: The edit screen within each Element.

You can deploy as many individual Elements in pages and posts as you need, there is no limit. Within each of the Elements, you will see a tab or tabs that house an array of options that make it possible for you to configure each Element independently, and greatly enhance your flexibility and creative options.

  • Name Of Modal – Allows you to set your Modal’s unique identifier. This is used for linking the Modal to a Modal Trigger.

  • Modal Heading – Allows you to set your Modal’s heading text.

  • Size of Modal – Allows you to set the size of your Modal.

  • Background Color – Allows you to set the background color of your Modal.

  • Border Color – Allows you to set the Modal border color.

  • Show Footer – Allows you to set if your Modal will show the footer with the close button or not.

  • Contents of Modal – Allows you to set your Modal’s content.

  • CSS Class – Allows you to add a class to the wrapping HTML element.

  • CSS ID – Allows you to add an ID to the wrapping HTML element.

View The Options Screen

Global Options

There are no Global Options for the Modal Element.

Avada Website Builder

858,309 Businesses Trust Avada

Get Avada
Avada Website Builder

858,309 Businesses Trust Avada

Get Avada
Avada Website Builder

858,309 Businesses Trust Avada

Get Avada