cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pnass001
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
mdevaney
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
mdevaney
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,046)