Ensuring empty rows are not inserted

Right now, the InsertRow does not have any way to tell if the data that it is inserting is valid or not. For example, the user might click on the SendRSVPButton by mistake and that will insert a blank row. We can fix this by checking to make sure that the guest has typed in at least the name before we insert anything.

To achieve this, we can place all the blocks that we created within an if /then statement. The condition that we will check for is whether the NameTextBox. Text is empty or not. If the NameTextBox.Text is not empty, then that means the guest must have typed something and we will allow the insertion to happen. "If the NameTextBox.Text is empty, then the if statement is not true, and the then set ...

Get App Inventor 2 Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.