Page 1 of 1

Disallow blank input for Text Field UI

Posted: Mon Jan 16, 2023 9:52 pm
by ehdusjenny
Hello,

Currently I have my dialogue system set up, and I'd like to forbid the user to enter an empty input in their response via Text Field UI. I have Standard Input UI Field component's "Allow Blank Input" unticked. However the user can still press enter and submit an empty input.

I've checked that I have the correct corresponding Panel, Label and Input Fields added as well. Would you know what other config I'm missing?

Thank you for your help!

Re: Disallow blank input for Text Field UI

Posted: Tue Jan 17, 2023 10:42 am
by Tony Li
Hi,

Here are two ways to accomplish that:

1. UNtick the StandardUIInputfield's Allow Blank Input checkbox.

2. Or, if you want to do more thorough checks for things like banned words, add dialogue entry nodes that check the text and loop back if it's blank, similar to the conversation at the bottom of How To: Read Input From Player During Conversations.