cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gorilla_8
Post Prodigy
Post Prodigy

Highlight mandatory fields in the powerapps if you are looking for white or empty

Hello guys!

 

I have several forms that have mandatory and visible fields depending on other fields, what I want to do is:

 

Would it be possible, when saving the form, that the fields that are mandatory and not filled in are highlighted for the user?

 

1 ACCEPTED SOLUTION

Accepted Solutions

@Gorilla_8 

 

In that case, you can setup the configuration as:

 

RequiredControls -> Border Color -> If(varHighlight && IsBlank(ControlName.Text), RGBA(highlightcolor),RGBA(normal color))

 

Save Button ->  If(IsBlank(Control1.Text) || IsBlank(Control2.Text) || IsBlank(Control3.Selected.Value), Set(varHighlight,true), Set(varHighlight,false)) ;If(varHighlight=false, SubmitForm(FormName)) 

 

Here, we are checking whether all the required fields are filled, it they are we are setting varHighlight  as false, and submitting the form, otherwise we are setting varHighlight as true and highlighting the fields.

 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

4 REPLIES 4
yashag2255
Dual Super User II
Dual Super User II

Hi @Gorilla_8 

 

To configure something like this, you can set the Border Color of Text Inputs or Input controls to Red or any other color of choice, when the user hits save button. 

 

Control -> BorderColor -> If(IsBlank(ControlName.Text), RGBA(highlighted color), RGBA(normal color))

 

Instead of this, you can also disable save button until all the required fields are filled.

Example: If(IsBlank(Control1.Text) || IsBlank(Control2.Text) || IsBlank(Control3.Selected.Value), displayMode.Disabled, DisplayMode.Edit) 

 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Gorilla_8
Post Prodigy
Post Prodigy

@yashag2255 

 

Thanks, but I know this...

What I really wanted is to flash the field or something ... Complicate a little ...

@Gorilla_8 

 

In that case, you can setup the configuration as:

 

RequiredControls -> Border Color -> If(varHighlight && IsBlank(ControlName.Text), RGBA(highlightcolor),RGBA(normal color))

 

Save Button ->  If(IsBlank(Control1.Text) || IsBlank(Control2.Text) || IsBlank(Control3.Selected.Value), Set(varHighlight,true), Set(varHighlight,false)) ;If(varHighlight=false, SubmitForm(FormName)) 

 

Here, we are checking whether all the required fields are filled, it they are we are setting varHighlight  as false, and submitting the form, otherwise we are setting varHighlight as true and highlighting the fields.

 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Gorilla_8
Post Prodigy
Post Prodigy

@yashag2255 

 

Hi, thanks for the help!

But how I can check if the field is required? Because, if the field is not visible and required he will show red border color and have an error...

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Top Kudoed Authors
Users online (59,546)