Sharepoint - How to Add Blank to choice field?
You could use a unicode character that does not print anything. I tried it with U+205F and it seemed to work as expected. To put this character in, open up the charmap (Start->Run->charmap) on your machine, then select a font that has unicode support (I chose calibri), scroll almost to the bottom and find the U+205F. You can then double click the character and it will place it in the textbox below. You can then copy that value and put it in a choice field option and it will appear as blank to the user.
EDIT: Make sure you also put it in as the default value, otherwise you will get three choices (NULL, U+205F, and YES). Also, if you have any existing rows in the list, you will see three choices if the row has a null value currently assigned.
As you can see the test column now appears to have a blank option.
- Go to the column drop down list in question.
- At the first entry on the list do a return to create a blank space.
- Inside that blank space place your cursor and press and hold down the ALT key while typing 0129 on the NUMERIC KEYPAD. This will enter another type of “blank character” that SharePoint cannot wipe away.
- In the Default Entry setting do the same.
- Save and you are done.
Just create the Choice field as a drop down list with the only option of Yes and set no default value. When an item is submitted an empty value will be set in the list.
If a user sets the field and wants to revert back to no value, they'll be forced to go into datasheet mode to remove the selection. THe regular editform will not give them a means to deselct the only value in the list.
You could use some jQuery to set it back to empty. Here's a basic example.
<script type="text/javascript">
$(document).ready(function(){
$("[title$='YourDDLColumn'] option:selected").val();
});
</script>
You'll probably want to wrap it in some sort of click function or wrapped in logic that checks for a query string value to exist.
Alternatively you could create it as a Yes/No field with the default value being No (unselected). It would save into the list as No, not a blank value though.