cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mjgenesis
Level: Powered On

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
Super User
Super User

Re: Submit button not enabling

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
Super User
Super User

Re: Submit button not enabling

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

mjgenesis
Level: Powered On

Re: Submit button not enabling

It worked.  Thank you very much.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 163 members 5,834 guests
Please welcome our newest community members: