Hello Community,
I am trying to disable my submit button until the user fills all fields. The first field is a toggle, when the value is false the user uses a combobox to select a reason for false. When the toggle is true we want to allow the submit button to be used without selecting an item in the combobox. We tried this code but the submit button is still showing and operating with empty fields.
If(IsEmpty(ComboBox1.SelectedItems) And Toggle1.Value = false, DisplayMode.Disabled,DisplayMode.Edit)
Solved! Go to Solution.
Like this...
If(
Toggle1.Value Or (!Toggle1.Value And IsEmpty(ComboBox1.SelectedItems)),
DisplayMode.Edit,
DisplayMode.Disabled
)
---
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."
Like this...
If(
Toggle1.Value Or (!Toggle1.Value And IsEmpty(ComboBox1.SelectedItems)),
DisplayMode.Edit,
DisplayMode.Disabled
)
---
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."
Thank you for your help, but the code may be missing something. The comma following the isempty function states that there is a parenclose where the comma is expected.
@ag12
I missed a closing bracket. Please take a look at my corrected code above.
---
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."
Thanks a million! You are great
User | Count |
---|---|
122 | |
87 | |
86 | |
75 | |
67 |
User | Count |
---|---|
214 | |
181 | |
137 | |
96 | |
83 |