I have two fields when browsing to edit form that I need to require (not be blank) only under certain circumstances.
For example, I have 5 fields, A, B, C, D, E. D and E are only required to be filled out if A meets a certain criteria for example.
I was using the display condition, IF A = 1, display D and E, however it threw an error on all conditions where A != 1, because even though the field was hidden, it was requiring it to be filled out anyway.
So, what I am asking is, how can I set conditional required (non-blank) fields?
Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
Require a field in certain circumstances
-
- Posts: 8
- Joined: Mon Sep 14, 2015 3:40 pm
-
- Site Admin
- Posts: 2781
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 1 time
Re: Require a field in certain circumstances
CreationX,
You will need to set these fields to Can Be Left Blank and validate these things at the point of saving using nuOnSave() http://wiki.nubuilder.net/nubuilderv3/i ... Save.28.29.
You may also find that using nuEnable() and nuDisble() http://wiki.nubuilder.net/nubuilderv3/i ... C_value.29.
It won't hide the field but along with disabling it, it can also reset its value. And it will know if the field is a Text, Lookup etc.
Steven
You will need to set these fields to Can Be Left Blank and validate these things at the point of saving using nuOnSave() http://wiki.nubuilder.net/nubuilderv3/i ... Save.28.29.
You may also find that using nuEnable() and nuDisble() http://wiki.nubuilder.net/nubuilderv3/i ... C_value.29.
It won't hide the field but along with disabling it, it can also reset its value. And it will know if the field is a Text, Lookup etc.
Steven
-
- Posts: 8
- Joined: Mon Sep 14, 2015 3:40 pm
Re: Require a field in certain circumstances
Thank you, I am trying to do this with limited JavaScript knowledge.
I am also having a problem with dropdowns not selecting a default value when using static values (ex. 1|Yes|2|Maybe|3|No)
It comes up blank on edit form.
I am also having a problem with dropdowns not selecting a default value when using static values (ex. 1|Yes|2|Maybe|3|No)
It comes up blank on edit form.
-
- Posts: 8
- Joined: Mon Sep 14, 2015 3:40 pm
-
- Site Admin
- Posts: 2781
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 1 time
Re: Require a field in certain circumstances
Can you get the Default to work on a Text Object?
Steven
Steven
-
- Posts: 8
- Joined: Mon Sep 14, 2015 3:40 pm
Re: Require a field in certain circumstances
Yeah, default works great on a text object.admin wrote:Can you get the Default to work on a Text Object?
Steven
-
- Site Admin
- Posts: 2781
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 1 time
Re: Require a field in certain circumstances
Can you do a screen dump of the Default SQL and the list in SQL and share it here?
Steven
Steven