+ Start a Discussion
TiborMTiborM 

Visualforce picklist values limiting + picklist field default value from object Case

Hi,

 

what I have to do if I have picklist field from Case object and I want to show only 1 value from this picklist to user on Visualforce page?

 

And what I have to do to make some value default in picklist field?

Anand@SAASAnand@SAAS

For defaulting the value, in the controller set the default value to the case variable in the controller. That should automatically default the value in your page.

 

To restrict the values displayed, refer to http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_selectList.htm and Apex Desribe http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_dynamic_describe_objects_understanding.htm on how you can do this.

TiborMTiborM

this is not exactly what I want.

 

In CASE object is field REASON. THis field have some items and it is Picklist.

I have page where I'm using  this:

 

<apex:inputField value="{!Case.Reason}" required="true" />

 

I want show only 1 item from this field and if it possible automaticaly select it in this Picklist.

 

 

How can I do this?

 

 

TiborMTiborM

any news?