cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Patron
Post Patron

How to make a dropdown required to be filed out before submitting a form

I am trying to make these fields attached below all required before submitting a form (The Submit button will not be clickable). It works for text inputs but with the dropdowns I'm doing something wrong. How can I make a choice within the dropdown blank to work with this code, other than including "" in the items field because that didn't work for me. 

 

The Displaymode for my Submit button:

If( (IsBlank(StandardEndorserName1E.Text)) || (IsBlank(DesignNumberE.Text))|| (IsBlank(DepartmentE.AccessibleLabel))|| (IsBlank(ModuleE.AccessibleLabel)), DisplayMode.Disabled, DisplayMode.Edit )

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

@pnass001 
See my code below.  You'll want to refer to the Selected property with the your column name.  Many times this is just Dropdown.Selected.Value.  

 

If(
    IsBlank(StandardEndorserName1E.Text
    || IsBlank(DesignNumberE.Text)
    || IsBlank(DepartmentE.AccessibleLabel)
    || IsBlank(ModuleE.AccessibleLabel)
    || IsBlank(Dropdown.Selected.Column_Name),
    DisplayMode.Disabled,
    DisplayMode.Edit
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

5 REPLIES 5
Super User III
Super User III

@pnass001 
See my code below.  You'll want to refer to the Selected property with the your column name.  Many times this is just Dropdown.Selected.Value.  

 

If(
    IsBlank(StandardEndorserName1E.Text
    || IsBlank(DesignNumberE.Text)
    || IsBlank(DepartmentE.AccessibleLabel)
    || IsBlank(ModuleE.AccessibleLabel)
    || IsBlank(Dropdown.Selected.Column_Name),
    DisplayMode.Disabled,
    DisplayMode.Edit
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

@mdevaney  Ok done, but what happens if they don't fill in the text inputs and drop downs? I want the Submit Button to not be able to be clicked on. What can I do to rework the code I posted above to make the button's displaymode enabled only if all fields have been filled out

@pnass001 
OK.  I thought you had already worked out the rest.  I'm kind of confused about your references to the accessible label.  Here's the generic code you could write for the 4 required fields

 

If(
    IsBlank(TextInput_StdEndorsersName.Text)
    || IsBlank(DepartmentE.Selected.Value)
    || IsBlank(ModuleE.Selected.Value)
    || IsBlank(DesignNumberE.Text),
    DisplayMode.Disabled,
    DisplayMode.Edit
)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

@mdevaney It works! Thanks. Forget my previous reply. Was in regards to another comment.

@pnass001 

I’m glad you let me know, I was confused lol!

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (13,536)