cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gorilla_8
Impactful Individual
Impactful Individual

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

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
Impactful Individual
Impactful Individual

@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!

Gorilla_8
Impactful Individual
Impactful Individual

@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
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,586)