cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mjgenesis
Frequent Visitor

Submit button not enabling

My Submit button has the following setting for the DisplayMode property requiring there to be no errors with the form to work. 

 

If(Form1.Valid && IsBlank(lblErrorMessage.Text),DisplayMode.Edit,DisplayMode.Disabled)

 

I have created a Label (lblErrorMessage) with the following formula for the TEXT value to display an error message if the email addresses are not formatted correctly in their respective input fields.  However, when I run/test the form my Submit button remains grayed out as if there is some text still inside lblErrorMessage.

 

If(And(Not(IsMatch(inpBillEmail.Text, Match.Email)),Not(IsBlank(inpBillEmail))), "-Please verify your Billing email address is correct") & Char(13) & Char(10) &
If(And(Not(IsMatch(inpContactEmail.Text, Match.Email)),Not(IsBlank(inpContactEmail))), "-Please verify your Contact email address is correct") & Char(13) & Char(10) &
If(And(Not(IsMatch(inpContact2Email.Text, Match.Email)),Not(IsBlank(inpContact2Email))), "-Please verify your Contact 2 email address is correct")

 

Consequently, if I add the following to the end ( & Char(13) & Char(10) &)  my Submit is available, but my formula will have errors expecting an operand and with an invalid argument type.

 

I would like the button to remain disabled until there are no errors on the form and all email input fields are formatted properly.  I am new to Powerapps, so I'm hoping this is some easy newbie blunder. Thanks in advance!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Thorpe
Super User
Super User

The label may not be showing text but it still has the Char(13) & Char(10) values in it. Try using trim in your conditions test to remove the extra characters. See example below:

 

If(Form1.Valid && IsBlank(Trim(lblErrorMessage.Text)),DisplayMode.Edit,DisplayMode.Disabled)



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

2 REPLIES 2
Jeff_Thorpe
Super User
Super User

The label may not be showing text but it still has the Char(13) & Char(10) values in it. Try using trim in your conditions test to remove the extra characters. See example below:

 

If(Form1.Valid && IsBlank(Trim(lblErrorMessage.Text)),DisplayMode.Edit,DisplayMode.Disabled)



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

It worked.  Thank you very much.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,428)