Title: null_select not working properly
Last modified: November 6, 2017

---

# null_select not working properly

 *  [MarionFW](https://wordpress.org/support/users/marionfw/)
 * (@marionfw)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/null_select-not-working-properly/)
 * I’ve got a dropdown list (a not required field) that starts with “null_select”,
   so an empty field.
    Instead of not showing the record in the list on the front
   end (shortcode selects only fields that are not empty), the record is shown, 
   and displays the text “null_select”.
 * I’m quite sure the null_select function worked fine before, and have no idea 
   where to look for a solution to get the list working again. I need the possibility
   to change this field to empty/no choice.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/null_select-not-working-properly/#post-9657657)
 * If you are not using “value titles” (that means using the :: notation to indicate
   a display value and a saved value for each option) for the options in your dropdown,
   you won’t need to include a “null_select” item. If you do include it, it will
   be treated as a literal option, as you describe.
 * So: the solution is to either use “value titles” or remove “null_select” as an
   option in your dropdown.
 *  Thread Starter [MarionFW](https://wordpress.org/support/users/marionfw/)
 * (@marionfw)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/null_select-not-working-properly/#post-9658000)
 * thanks for the reply.
 * I do use value titles, but the problem also appear in other lists without value
   titles (I just tried this).
 * The problem in both casis is: what if a value title has to be removed? I can’t
   delete a value once it has been added to a record, so I need a ‘no choice’option.
   
   How do I resolve this? Is there a way to add a ‘no choice’ field to the list?
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/null_select-not-working-properly/#post-9660583)
 * So, if you’ve got records with “null_select” as the stored value, you can fix
   this in the database if you know how to write simple database queries. If you
   want to work around it, you could create an option (using a value title) that
   was something like
 * No Choice::null_select
 * but that would continue the problem, not solve it.
 * If the value in the record doesn’t match any of the defined options (and the 
   field is not an “other” type field) then it will show the null option. If your
   options don’t use value titles, then you can just remove “null_select” from the
   options and let the problem fix itself over time.
 *  Thread Starter [MarionFW](https://wordpress.org/support/users/marionfw/)
 * (@marionfw)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/null_select-not-working-properly/#post-9660850)
 * Hi,
 * I’m afraid I’m not able to write database queries, so that’s no option, besides
   the fact that it does not really solve the problem. For a temporary solution,
   I could exclude this in the shortcode.
 * But what really puzzles me is how removing “null_select” from the options in 
   the dropdown list would solve my problem: it would leave all options, but not
   the possibility to empty the field: once a field has been chosen and stored, 
   you cannot undo the choice either in the frontend or in the backend. That is 
   why I used the null_select (as is explained in the part Values on [https://xnau.com/work/wordpress-plugins/participants-database/participants-database-documentation/defining-participants-database-fields/](https://xnau.com/work/wordpress-plugins/participants-database/participants-database-documentation/defining-participants-database-fields/).“
   It’s a good idea to have either a null select or default defined for all dropdown
   fields.”).
 * This null_select option did work fine before for all 3 dropdown listst I use (
   value not required, one with and two without value titles. Chosing the null_select
   option in the backend did result in an empty field just like when there never
   had been made a choice.
 * Perhaps my question comes down to how to make the default an empty field.
 * Thank you for bearing with me….

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘null_select not working properly’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [MarionFW](https://wordpress.org/support/users/marionfw/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/null_select-not-working-properly/#post-9660850)
 * Status: not resolved