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
AlokVAlokV 

Picklist

Hi,

 

I have a picklist which has one field 'Others'. I want to appear a text box just below the picklist if a user selects 'Others'.

How can I achieve that? Is there any way around except record types?

 

Thanks in advance!

 

Rgds,

Alok

Laxman RaoLaxman Rao

You can do using visual force.

But you cannot do using the standard page layout.

phiberoptikphiberoptik

+1 @ Laxman Rao. Visualforce Apex has a command called rerender that can rerender a page (or section of a page) when a set of criteria is met (in your case, when Others is selected).

 

Beyond that, please promote this Idea which is currently under consideration and will allow this functionality without the use of custom code.

 

https://sites.secure.force.com/success/ideaView?id=08730000000BroxAAC

Nazeer AhamedNazeer Ahamed

Instead, I have very simple approach to achive this using standard layout and some configurations!!!

 

  1. Just create a custom field "Other XXX"
  2. Display this text field after the picklist field
  3. Create validation rule such a way, if "Others" selected in pick list filed, make the text field "Other XXX" mandate.

 

Hope this helps, Keep the application simple as much as possible.

 

VF page is not recomended for this simple need.

AlokVAlokV

@xphiberoptikx  , I promoted the idea. 

phiberoptikphiberoptik

Nazzy,


This does not meet the OP's needs though. They do not want the field visible unless the picklist value Others is selected. The only way to achieve this is via a Visualforce page.

Laxman RaoLaxman Rao

I agree with @xphiberoptikx

AlokVAlokV

@Nazzy,

 

I had discussed that idea even before posting it here and obviously concerned people did not like it.They want in that way only and I think I need to use visualforce.

AlokVAlokV

@xphiberoptikx  Can you provide me some code to get started with?

phiberoptikphiberoptik

Sorry, I cannot help you there. I am not a developer. Your best bet is to post your question in the Visualforce Development forum. Good Luck.

AlokVAlokV

No issues. Thanks!

Nazeer AhamedNazeer Ahamed

Alokv - I know the workaround mentioned is exactly you are looking as the use case / user experience need you described. but it could be another approach to provide the same functionality but user experience will be differ.

 

Check out the below some example on VF page code snipet.

http://boards.developerforce.com/t5/Formulas-Validation-Rules/I-want-if-I-select-a-value-from-picklist-the-other-field-should/td-p/496081

alok29novalok29nov

Thanks a lot for your help, Nazzy!