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

Make fields "required" and disable "Save" button

I came around this during my last custom project and didn't find an out of the box function or any info when searching here on Connect for an answer how to solve this problem.

Now as I found a solution (or workaround), I want to share it with you.


The challenge was to have fields in SharePoint NOT required, but on the form they MUST be required.

As a further consequence the Save button had to be disabled because else required fields are not very useful.

So there are three steps to realize that.

1. I added a red asterix to the field labels (really basic)

_Nintex1.PNG

2. Make the field required with a validation rule

_Nintex2.PNG

3. For each field you set required, you also have to create a formatting rule on the Save button to disable it

_Nintex3.PNG

Now the Save button should be greyed out until all required fields are not null or empty.

_Nintex4.PNG

Have fun!

P.S.: if there is an out of the box function that could avoid this workaround, please reply and let me know! ;-)

Labels: (2)
Reply
7 Replies
Workflow Hero

Re: Make fields "required" and disable "Save" button

This is a great solution!  By disabling the button(s) until the required data has been entered, there is no chance that the user will get the Confirmation Message associated with the button(s) and click OK; then get errors due to missing data.

Note: The above solution seems to imply that you should define the fields "not required" (hence the red asterisk on the field label).  This is not necessary since the required field logic will not interfere with the disabling of the button (a bit redundant, but will not hurt).

Reply
Workflow Hero

Re: Make fields "required" and disable "Save" button

Question -

I have two fields. If Field A equals No then i need Field B to be required. I currently have a validation rule set on Field B that says - (FieldA =="No"). Which does work. But then, when i actually put text into Field B, it still treats it as being invalid because Field A still has No. So i was thinking the validation should look something like (Field A =="No" && Field B is not empty). But i'm not sure what the syntax should be for that. Can you help? Is there a better way?

0 Kudos
Reply
Not applicable

Re: Make fields "required" and disable "Save" button

Thanks for sharing this.

It is has provided me with a solution to my problem regarding validation.  A user can no longer submit the form unless the form is completely filled (or the required fields are).

Karen

0 Kudos
Reply
Not applicable

Re: Make fields "required" and disable "Save" button

Hi Candace, this is a late response, but in the future if anyone is looking for a similar solution (how I got to this forum post), then this should help them.

The solution I found for the same challenge was to use the IF statement in the rule condition.  This is a Nintex 2013 example, so and, equal... vs &&, ==...

Formula: IF(logical test, value if true, value if false)

If(NOT(SubFileYESorNO),isNullOrEmpty(AgreementType),isNullOrEmpty(AgrmtNumber))

In this example, IF control NOT(SubFileYESorNo) - a yes/no checkbox - is checked, then it is TRUE, control Agreement Type being null / empty is what triggers the formatting.  If SubFileYESorNo is not checked, then it is FALSE, control Agreement Number being null / empty triggers the formatting...

0 Kudos
Reply
Workflow Hero

Re: Make fields "required" and disable "Save" button

Hi, I have a couple of questions regarding the example that you gave.  I hope it's ok to ask them here:

  • when you add the condition to the button, are you using the 'Item Properties' or the 'Named Controls' in the formula?
  • when you have multiple conditions for the same button, do you add them as separate rules or do you expand on the one formula?

Thank you

0 Kudos
Reply
Workflow Hero

Re: Make fields "required" and disable "Save" button

Christina,

You need to use “named controls” in order for the condition to work properly as you move around the form.

I used separate rules on my form (may have more than one referring to the same button). But I’m sure a single formula would work also. It just might be a bit trickier to make sure you had the right syntax in a more complex formula.

Thanks,

Ron Pillsbury

Business Systems Analyst

Goodwill Industries of Northwest NC

2701 University Parkway, Winston-Salem NC 27105

T| 336.724.3625 x1333 C| 336.749.8009

rpillsbury@goodwillnwnc.org<mailto:rpillsbury@goodwillnwnc.org>

Reply
Workflow Hero

Re: Make fields "required" and disable "Save" button

Many thanks, Ron. 

0 Kudos
Reply