No complicated code or configuration is required to use AlertConfirm in a basic setup. The alert or confirmation dialogue popups are styled using the web browser native controls and always force their way to the front of the screen. You can use the AlertConfirm stack for a multitude of different purposes; wherever you need to display something important for the end user to read. It is also possible to use multiple AlertConfirm stacks on the same webpage.
ExampleClick the button below. You are presented with a confirmation popup. Clicking cancel works to cancel the action. Clicking OK continues the action, in this case opening a web link in a new browser tab.
As well as having an alert or confirmation appear when a button is clicked, you can also configure this stack to display your alert or confirmation on page load or when another action happens (like a form is submitted).
SetupInstall AlertConfirm into Stacks and RapidWeaver, in the normal way. Then follow these instructions to create your first alert or confirmation popup:
- Open your Stacks Library. Search for AlertConfirm. Drag and drop a copy of the stack into your webpage.
- Select the stack in edit mode and reveal its settings, in the Stacks side panel.
- From the Configuration menu, toggle between setting-up either an alert or confirmation popup.
- If using more than one AlertConfirm on the same page, change the ID number.
- Enter the text you want shown in the popup message.
- From the Trigger menu, choose how you want the alert or confirmation popup to be opened. For a button trigger, place a suitable button stack in the drop zone shown. Or use HTML code and make your own button.
- Preview the webpage in a normal web browser (like Firefox, Chrome, Safari or Edge) to see the AlertConfirm stack working.
Customising message textMessage text needs to be entered as plain text. Double quote marks ( " and " ), HTML code and special characters are not supported and risk breaking the popup. Take care not to enter too much content, so as to cause users on smartphones an inability view the whole message! At the most, there should be no more than a few lines of written content.
If you want to put a line break between sentences or words in your message type