Is a modal the quickest way to request input from a user?

From what I understand, it’s not possible to use the JavaScript dialog function in Retool to display a dialog with an input on it. Often, I want to capture a single input field from a user, such as a date, or a pop up saying “enter account number:” etc.

Is using a modal the only way to do that?

Hello, I think you are finding some solution like window.prompt() in retool right? unfortunately, It seem there isn't no so component now. Maybe the Modal is the best way.

1 Like

You can also hide a text input field somewhere in the form/canvas and then have it appear based on user interaction...

2 Likes

Thanks for asking about this @lmonroe, and awesome suggestions @AnsonHwang and @ScottR. Couple additions from my side in case useful -

While this isn't the same as window.prompt() , thought it may be of interest:

Our Eng team is working on new UI primitives to make it easier for users to build common layout patterns in Retool. Modals & drawers are a powerful way for users to drill down into business logic:

And here's forum post on how to show/hide dynamically (in relation to @ScottR's suggestion)!

See @AnnaW 's update about the drawers feature I mentioned above!