I am using nubuilder-v2.7.4.11-12.10.24-Build529 on Ubuntu 12.10 browsing with Chromium 22.0.1229.94.
When creating the list of items for a dropdown menu, nuBuilder always adds a NULL item to the beginning of the list even if I set "Stop Blanks" to "Yes" on the Dropdown tab. How can I prevent the NULL item from being added?
I would think that if NULLs are not allowed for a field, we should not present a NULL choice to the user.
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
How to prevent NULL entry in dropdown list?
-
- Posts: 15
- Joined: Fri Nov 23, 2012 11:31 pm
-
- Posts: 84
- Joined: Mon Jul 04, 2011 12:52 am
Re: How to prevent NULL entry in dropdown list?
if u set "Stop Blanks" to "Yes" the form can't be saved before user has selected some value.
i don't share your logic, but you can solve the "problem" by setting a default value for the dropdown.
i don't share your logic, but you can solve the "problem" by setting a default value for the dropdown.
-
- Posts: 15
- Joined: Fri Nov 23, 2012 11:31 pm
Re: How to prevent NULL entry in dropdown list?
I am already setting a default value for the field. That does not solve the problem. The problem is that we are presenting an option to the user that is not valid. Why present to the user an option that is not valid? I go through the effort of presenting only valid choices, and nuBuilder adds an invalid choice to the list.
It is a usability issue.
It is a usability issue.
Re: How to prevent NULL entry in dropdown list?
tschutter,
Try this in the Javascript section of Custom Code of your Form's property..
Steven
Try this in the Javascript section of Custom Code of your Form's property..
Code: Select all
function nuLoadThis() {
$("#tra_type option[value='']").remove();
}
-
- Posts: 15
- Joined: Fri Nov 23, 2012 11:31 pm
Re: How to prevent NULL entry in dropdown list?
Try this in the Javascript section of Custom Code of your Form's property..
-
- Posts: 15
- Joined: Fri Nov 23, 2012 11:31 pm
Re: How to prevent NULL entry in dropdown list?
Ah, I missed that tab. I added that code to the Javascript tab. Didn't work.