ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
To download NI software, including the products shown below, visit ni.com/downloads.
This library shows an example of how to use sweetalert2 which describes itself as "a beautiful, responsive, highly customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes."
Some features include:
Also supports creating toast-style notifications:
Configure the dialogs using just your LabVIEW skills. For even more control get creative with custom CSS. Includes an example of creating a re-usable library for sharing dialog stylesheets between WebVIs.
Release 4 - Updates for G Web Development Software 2022 Q3 Patch 2
Release 3 - Support for G Web Development Software 2021
Release 2 - Support added for selector dropdowns
Release 1 - Initial release
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
This is a really nice set of popups. Is it able to support a popup with a drop down menu?
Hi Mike1979! Yep, the SweetAlert library does support drop down menus via the selectors feature. I added a VI that lets you configure a selector input type in Release 2.
Hi. MilanR.
I'm studying the Prompt function with code you posted., is there any way to configure this with multiple text-boxes? For example, a modal popup of JavaScript, etc.
Hi twoj,
Unfortunately the underlying sweetalert2 library does not have built-in support for multiple inputs. I would recommend using the progress indicators with sequential popups to request multiple input values.