Input dialog with Message Box?

02-10-2021 10:26 AM
by Anonymous User
Not applicable

Hi There,

I am wondering how I can add an input text box to the jimu message box in WAB.  Right now, I am using a prompt in javascript to ask users for a simple passcode in an if statement like this:

var person = prompt("Passcode:", "")
if (person == "acre555" ) {

} else {
var person = alert("A valid passcode is required to use export resources")

This totally works but is not very elengant.  I got the jimu message working but I dont see any options to add a simple input box.  Is this possible?  Thanks!!

Tags (1)
0 Kudos
1 Reply
MVP Esteemed Contributor

There doesn't appear to be a jimu textbox. I used a dijit/form/TextBox in my widgets, set up like this in the html file:

<div data-dojo-attach-point="baseGridLayerName" class="esriCTAGOLTextBox"
     data-dojo-type="dijit/form/TextBox" trim="true" required="true">

and accessed like this in the javascript&colon;



0 Kudos