cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

For a form field - Require a field based on another field

Jump to solution

If I have 2 fields: Product and Sourcing

If the Product is "Dairy" I want to make "Sourcing" a required field ?  If this is possible can you provide a link on how to accomplish this...

Labels: (1)
0 Kudos
Reply
2 Replies
Workflow Hero

Re: For a form field - Require a field based on another field

Jump to solution

Hi David,

yes you can do this. In forms designer, select your sourcing field and hit Add Rule in the ribbon.

Change the rule from Formatting to Validation and open the formula designer.

Afterwards create the following rule:

and(contains(Product, "Dairy"), isNullOrEmpty({Self}))

Last thing is to create a Message, that will be shown if the validation is false.

The formula will check if Product contains Dairy AND sourcing is empty. In that case the form will show the message:

Hope this helps.

Best regards

Enrico   

Reply
Workflow Hero

Re: For a form field - Require a field based on another field

Jump to solution

Hi David,

you can achieve this by adding a validation rule to your "Sourcing" field like following:

This rule says that your "Sourcing" field is invalid if it is empty and your "Product" field equals "Dairy". I used a choice field for product here but should work the same way for most other field types. You can use the formula builder to create the formula and use references to fields and runtime functions very easily.

Best Regards

Philipp

Reply