cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

How to make a text box a required ?

When somebody entering in infromation I need some textbox required before they sumbit it.

8 REPLIES 8
Highlighted
Impactful Individual
Impactful Individual

Re: How to make a text box a required ?

There is Probably a better way to do this, but I do it this way. Since it's a manual screen and not a form, forms have built in require options in the properties for fields. But on a manual check. I Do two things. 

 

1. Add logic to my save button DisplayMode. I do a IF(isBlank(Textbox1.Text) || isBlank(Textbox2.Text),DisplayMode.Disabled,DisplayMode.Edit)  This will make the button not active or clickable until the fields are field out. 

 

2. Create labels near the field, and put in the *Requires a Value in red text, and make it's visable based on having a value using isBlank(Textbox1.Text) 

Highlighted
Microsoft
Microsoft

Re: How to make a text box a required ?

You can access the Entity and mark specific fields as required. If a user attempts to submit the form they will be told that missing data is required. Using this setting should alwo include a visible * to indicate the field is required. 

required field.jpg

Highlighted
Post Patron
Post Patron

Re: How to make a text box a required ?

Hi @cwebb365 What am I doing wrong? Thanks in advance

Highlighted
Impactful Individual
Impactful Individual

Re: How to make a text box a required ?

Only thing I can think of put both is blanks in a parentheses (). Is it the displaymode property or icon 3 that’s showing? What if you put in just one of those modes by itself?
Highlighted
Post Patron
Post Patron

Re: How to make a text box a required ?

@cwebb365  it works now. Was an error on my behalf. I put the code within Onselect instead of Displaymode.

 

One more question: If they try to click on submit (and it won't because those fields are empty) can an error message pop up in red saying to fill out the required fields. I know how that I would have to create a label and then make it visible IF submit button does not run properly, fails or some sort like that. Is that possible? 

Highlighted
Impactful Individual
Impactful Individual

Re: How to make a text box a required ?

The quick and easy way is on visable of the labels with the message is to say If(submitbtn.DisplayMode = DisplayMode.Disabled,true,false)

Highlighted
Post Patron
Post Patron

Re: How to make a text box a required ?

it works. thank you!
Highlighted
Post Patron
Post Patron

Re: How to make a text box a required ?

@cwebb365  It works but how do I only let the error message pop up if they click on the submit button and it won't submit due to the missing fields. Currently the error message pops up until the fields are filled .

 

For example, in the screenshot (app 33), I would like that invisible error message to pop up once the flow fails. It failed because the form hasn't been submitted yet, so a PDF copy cannot be made.

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (818)