Hello Power Apps Community,
I am seeking an easy way to disable a form's save button if any of the required fields on the form are not completed, or any field on the form (even non-required fields) fails validation.
Originially, I was using the following code in the form's DisplayMode property:
If(
!IsBlank(ErrorMessage69.Text) || !IsBlank(ErrorMessage70.Text) || !IsBlank(ErrorMessage71.Text) ...
DisplayMode.Disabled,
DisplayMode.Edit
)
However, this means I have to list every field on the form.
I would prefer to use something like the following code:
If(frmRecord.Valid,DisplayMode.Edit,DisplayMode.Disabled)
However, this only disables the save button in my app if a required field is not completed on a form.
Is there a way to get the ".valid" property to show True for fields that don't fail validation (i.e. show an error message)? Thus I could use "FormName.Valid" in the Save button's DisplayMode to disable it if required fields are not completed AND any field shows an error message because it fails data validation.
Thanks for reading,
Matren
CC: @WarrenBelz , @RandyHayes