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!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Require a field in certain circumstances
-
- Posts: 8
- Joined: Mon Sep 14, 2015 3:40 pm
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.
Re: Require a field in certain circumstances
CreationX,
Setting a default is done with SQL..
Steven
Setting a default is done with SQL..
Steven
You do not have the required permissions to view the files attached to this post.
-
- Posts: 8
- Joined: Mon Sep 14, 2015 3:40 pm
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
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