Announcements
Hi,
I need some help with setting the display mode of a save button for a form I am using. I have a form which has a status field in and depending on what status is chosen I want certain fields in the form to become mandatory. I have a 7 options to choose from in my status column and each one has a combination of mandatory fields.
Anybody have any ideas on how I can accomplish this please?
Thanks
Abdullah
Hi @Abzyb,
Did you consider storing that information (required fields per status) somewhere (e.g. a collection)? Once you do that, you can refer to it and determine the DisplayMode of your button.
You can create boolean variables for each field you need filled in,
You can then check if these variable are true using an if statement in the button display. You can check multiple variables using the && operator
Below is an example:
If(varFieldEntered = true && (IsBlank(txtStatusField) = false),DisplayMode.Edit,DisplayMode.Disabled)
Thanks for getting back to me. If I were to use variables where does the variable need to be set?
You can set the variable in the OnChange property, this way when the field is changed you can check the field value and set the variable accordingly
@Abzyb
II would use @QuantmResonator's suggestion but would use the variable in the Required property of the field card. That way the user will be informed of the problem and the submit button won't fire until the requirements are met.
II would use @QuantmResonator's suggestion but would use the variable in the Required property of the field cards. That way the user will be informed of the problem fields and the submit button won't fire until the requirements are met.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 396 Super User 2026 Season 2
Mohsin Ali 323
WarrenBelz 193 Most Valuable Professional