class Browser method .inputBox()

Browser is the Apps Script service.

.inputBox() is the method name you will see after a dot in your code.

What it does

Shows a dialog that asks the user to type a response.

Why it's used

  • Ask for one piece of text in a basic dialog.
  • Simple prompts when getUi prompt is not available.

Common errors

  • Forgetting parentheses on inputBox. Write Browser.inputBox(), not Browser.inputBox or inputBox by itself.
  • Skipping dots between chained calls. Each step needs a dot, like Browser.inputBox().
  • Adding spaces where they do not belong. Write Browser.inputBox(), not Browser .inputBox(), Browser.inputBox (), or Browser . inputBox().
  • Wrong capitalization. Use Browser and inputBox, not browser or inputbox.

Explore

Related methods

  • .msgBox()

    Shows a message box with OK or other buttons.

  • .buttons()

    Returns button constants used with msgBox and inputBox.

Better Sheets tutorials

No tagged tutorials yet. Fetch Apps Script from the harvest table and this page fills automatically.

Related blog posts

Written guides about Browser.inputBox().

Browse the blog