web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Stop form submission i...
Power Apps
Answered

Stop form submission if fields are blank

(0) ShareShare
ReportReport
Posted on by 53

Sorry if this has been posted before. 

 

I have a form linked to a sharepoint list. Im trying to make the forms mandatory and reading around i can use displaymode on the button with this command 

 

If(IsBlank(DataCardValue2) && !IsBlank(Title) && !IsBlank(DateValue3) && !IsBlank(HourValue3) && !IsBlank(MinuteValue3) && !IsBlank(DataCardValue21) && !IsBlank(DataCardValue22) && !IsBlank(DataCardValue25),DisplayMode.Disabled)

 

But its not working. have i done something wrong? 

 

Screen shot
form.jpg

 

 

Thank you in advance 

Categories:
I have the same question (0)
  • C-Papa Profile Picture
    1,836 on at

    Hi, select the datacard, the select Required from the menu and change to true

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @RHADAVE 

    You need not do all the comparisons (and, you will want to compare the property of the control, not the control - i.e. DataCardValue22.Text, not just DataCardValue22).

    If your field is required in the form, then simply set your submit logic to:

      If(yourForm.Valid, SubmitForm(yourForm))

    It will do all the other comparisons for you.

     

    I hope this is helpful for you.

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @RHADAVE 

    Oh, and noticing that you were using this for the DisplayMode...so the formula would be:

      If(Form7.Valid, Edit, Disabled)

  • RHADAVE Profile Picture
    53 on at

    thank you so much. ill give it a try this morning! 

     

    I really appreciate the help 🙂

  • Verified answer
    RHADAVE Profile Picture
    53 on at

    Hi mate, using

      If(Form7.Valid, Edit, Disabled)

    As soon as i fill in "requester" and "title" the button goes to orange which is the enabled colour... 

  • Verified answer
    C-Papa Profile Picture
    1,836 on at

    This will most likely be because you have not set the other fields as required. the Form7.Valid function is deciding if the form is ready to go, so if for example all fields had required set to false, your button would always be orange / in edit mode, but if all fields were set to required (true) the button will not change to orange / edit mode until the last input value has been filled out in the form. 

  • RHADAVE Profile Picture
    53 on at

    OMG!!! IT WORKS!!! Yeeeeeeeeeeeeeeaaaaaaaaaahhhhhhh! 

     

    You have no idea how much i appreciate the help. 

     

    I have never used PowerApps until 2 weeks ago, and its been a steep uphill climb trying to build this. Last bit of coding i touched was visual basic 16 years ago in I.T boot camp! 


  • RHADAVE Profile Picture
    53 on at

    Just wondering, is there a command i can use to display a message if the disabled "send request" button is pressed when the form is blank, instead of using a tool tip. Just a friendly prompt if someone has missed something out. It Avoids me getting lots of phone haha

     

    thank you

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @RHADAVE 

    If it is disabled...then users can't click on it!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard