Skip to main content

Pre-fill text field from input.textAsync with default string

  • January 26, 2022
  • 3 replies
  • 29 views

Forum|alt.badge.img+13

In scripting block, when calling

input.textAsync("Your Name")

it would be convenient to have an optional second argument to provide a default value in the text field:

input.textAsync("Your Name", "Jane Doe")

3 replies

Samir_Ghosh
Forum|alt.badge.img+16
  • Known Participant
  • August 23, 2022

Anyone have a workaround for this? E.g., You can code a default value if user enters nothing, BUT…there’s no way to enter nothing (i.e., requires user to enter a value before proceeding).


Alexey_Gusev
Forum|alt.badge.img+25

Anyone have a workaround for this? E.g., You can code a default value if user enters nothing, BUT…there’s no way to enter nothing (i.e., requires user to enter a value before proceeding).


You can put any letter or space, then delete it via backspace and “Next” button will remain active


Forum|alt.badge.img+17
  • Inspiring
  • August 24, 2022

Anyone have a workaround for this? E.g., You can code a default value if user enters nothing, BUT…there’s no way to enter nothing (i.e., requires user to enter a value before proceeding).


In my script, I prompt the user to enter 0 in the place of nothing. It’s not elegant, but it gets the job done.