2

Is there a way to use React Native's AlertIOS api to have an alert with multiple textfields? It seems like the prompt function only allows for one.

And if there isn't a way to have multiple textfields, how would I go about adding this functionality to an alert?

Any help would be much appreciated! Thanks!

comp_sci5050
  • 145
  • 2
  • 11

1 Answers1

1

I assume you would like multiple plain text input fields in your Alert? If so, it is not possible with vanilla React Native. If you look at the source code here and here, you'll see that only plain-text, secure-text or login-password are the available configurations. But if you really want multiple text fields in an Alert box (without considering not-so-great UX) , you could create a native module and do something like this.

Community
  • 1
  • 1
akshay_kashain
  • 700
  • 5
  • 12