Okay, so I have just had an idea but I have no idea how to execute.
I have a submit button on my form that has a patch() function as I am patching a person/group to a Sharepoint List which Submit() won't do.
My idea is, is to have the "Save" button disabled until the required fields are filled in. Does anyone have any ideas on how to do this?
Thanks!!
Solved! Go to Solution.
Hi @amydixanne
One way to do this is to set the DisplayMode property of your button like so:
If(IsBlank(FirstnameTextbox.Text) || IsBlank(SurnameTextbox.Text), DisplayMode.Disabled, DisplayMode.Edit
)
In this example, a user would need to enter text into the Firstname and Surname textboxes to enable the button.
Hi @amydixanne
One way to do this is to set the DisplayMode property of your button like so:
If(IsBlank(FirstnameTextbox.Text) || IsBlank(SurnameTextbox.Text), DisplayMode.Disabled, DisplayMode.Edit
)
In this example, a user would need to enter text into the Firstname and Surname textboxes to enable the button.
thank you, that works brilliantly!!!
Might be a little late but for those who find this post, there is an easier way!
@amydixanne in case you are interested,
Set submit button 'Display mode' to
If(formName.Valid,DisplayMode.Edit,Disabled)
Thank u so much!
On the DisplayMode property of the submit button you could do the following:
If(!IsBlank(DataCardValue1.Selected.Value) && !IsBlank(DataCardValue2.Selected.Value) && !IsBlank(DataCardValue3.Selected.Value),DisplayMode.Edit,DisplayMode.Disabled)
Note that the above works for required dropdowns. If you had the need for three dropdowns to be populated and one text field it would look like this (note the DataCardValue4 to identify the differences).
If(!IsBlank(DataCardValue1.Selected.Value) && !IsBlank(DataCardValue2.Selected.Value) && !IsBlank(DataCardValue3.Selected.Value) && !IsBlank(DataCardValue4.Text),DisplayMode.Edit,DisplayMode.Disabled)
User | Count |
---|---|
260 | |
109 | |
93 | |
57 | |
41 |