function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Srini NandhiSrini Nandhi 

How to Remove --None-- from Picklist values which is on VisualForce Page?

How to Remove --None-- from Picklist values which is on VisualForce Page?

Removing --None-- from the Picklist Values.
Sai Ram ASai Ram A
Hello Srini 

Use A SelectOption object, specifies one of the possible values for a Visualforce selectCheckboxes, selectList, or selectRadio component.
Follow Link:

P.S.  If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.

Thank you
BLearn - Sai
Srini NandhiSrini Nandhi
Hi Sairam,

Thansk for Reply.  I am not using SelectOption Object here.
I have 2 field which have more than 250 List of Values in thos picklists. and having Dependency.

So I cannot hardcode 250 values using  SelectOption object right.

I am using <apex:inputField Value="{!option}" /> tags and generationg form Object Fields. There i given Dependence.


If i select Language as 'English' the dependent value in Category should be ALL
if  i select "French"  category should be ALL_fr(and some more additional alues


Varun PareekVarun Pareek
You can add the required attribute to the field 
<apex:inputField Value="{!option}" required="true"/>

This will remove the --None-- option and make it as required (I believe thats what you are looking for). If not, you may have to write a javascript code to remove the --none-- value. But to me it's the same as making it required at the VF page level.
Srini NandhiSrini Nandhi

dependency is there for two fields. How can we remove using Java Script?
Fatima 1Fatima 1
@Varun Pareek

It worked for me.
Thanks for your help.