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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / FormSubmit when requir...
Power Apps
Unanswered

FormSubmit when required fields not complete

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have an app that has a form which is based on a SharePoint list. I have a button that performs the action SubmitForm:

 

     SubmitForm(FrmSelectedRequest);

 

All is fine but if the form has not been completed with all 'required' fields the form submits with an error message. How do I prevent the submit from happening if all the required fields are not complete?

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Anonymous,

    You can can use the Display mode property of the  Submit button to do what you require.  If DataCardValue2, 6 and 9 were required, then the formula would be

    If(IsBlank(DataCardValue2) || IsBlank(DataCardValue6) || IsBlank(DataCardValue9), Disabled, Edit)

     Then unless there was data in those three controls, the user could not successfully activate the Submit button.

    As an alternative, you could also hide the Submit button by putting a similar formula into its OnVisible property.  In this case, all three values would have to hold data for the formula to reduce to true and Unhide the button.

    !IsBlank(DataCardValue2) && !IsBlank(DataCardValue6) && !IsBlank(DataCardValue9)

     If this answers your question, please mark the thread as solved.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    Thank you. I can see that this will work but if the form has lots of fields the formula looks very clunky. I don't understand the purpose of the "Required" property if you can still submit the form when such fields are empty.
  • Dawidvh Profile Picture
    1,346 on at

    Hi @Anonymous 

    I agree with your thoughts and have faced the same problem. We use the EditForm.Valid method to check if the form is valid before submitting. We then use the !Parent.Valid on the asterisk in the cards to show which fields still have to be completed before allowing the submit. 

     

    Please see below video that discusses this in more detail.

    https://youtu.be/7O8HCz37Q0A

     

    Dawid van Heerden
    Follow on Twitter: @davestechtips
    Subscribe to YouTube: https://www.youtube.com/davestechtips?sub_confirmation=1
    **If you found this reply helpful, please mark this as the answer to close the topic and make it easier to find for other people with similar questions. AND we get points for it 😉

  • ElieCSalame Profile Picture
    3 on at

    this is a perfect solution for many required fields

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard