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 / Enable submit if a for...
Power Apps
Answered

Enable submit if a form with mandatory fields is hidden from view

(0) ShareShare
ReportReport
Posted on by 37

Hi,

 

I'm developing a simple form with a Sharepoint List as the data source. Each of the highlighted questions below will show a form associated with the relevant Qs on the 2nd screen if "Yes" is selected. If it's "No" the linked form will be hidden.

 

First screen:

SophRow_1-1683058226544.png

Second screen:

 

SophRow_2-1683058366641.png

 

Most of the fields are mandatory so I have set the Submit button up to be disabled unless all required fields are complete using:

 

If(
(Form2_4.Valid) &&
(Form2_3.Valid) &&
(Form2_2.Valid) &&
(Form2.Valid),
DisplayMode.Edit,
DisplayMode.Disabled
)

 

However, if any of the forms above are hidden based on the screen 1 selections how do i bypass the need for that form to be "Valid"?

 

Any help greatly appreciated!!

 

Best,

Soph

Categories:
I have the same question (0)
  • SophRow Profile Picture
    37 on at

    If it helps here are the datacard names for the first screen:

     

    SophRow_0-1683060097237.png

     

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @SophRow,

     

    You could check whether the toggle value if false or whether the form is valid, if either is true you check the next toggle or form and so on... Important to remember is that you will also have to apply similar logic to the SubmitForm function (only patch the Forms that are visible and filled in).

     

    If(
     //Adjust DataCardValue.. to the toggle linked to that form
     (!dataCardValue1.Value || Form2_4.Valid) &&
     (!dataCardValue2.Value || Form2_3.Valid) &&
     (!dataCardValue3.Value || Form2_2.Valid) &&
     (!dataCardValue4.Value || Form2.Valid),
     DisplayMode.Edit,
     DisplayMode.Disabled
    )

     

    Alternatively, you could reference the Form's visible property directly instead of using the toggles (same logic):

    If(
     (!Form2_4.Visible || Form2_4.Valid) &&
     (!Form2_3.Visible || Form2_3.Valid) &&
     (!Form2_2.Visible || Form2_2.Valid) &&
     (!Form2.Visible || Form2.Valid),
     DisplayMode.Edit,
     DisplayMode.Disabled
    )

     

    If this solves your question, would you be so kind as to accept it as a solution.

    Thanks!

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 493 Most Valuable Professional

#2
11manish Profile Picture

11manish 479

#3
Haque Profile Picture

Haque 328

Last 30 days Overall leaderboard