- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
01-28-2013 06:59 AM
In my requirement -there is a picklist field with multiple values. One of the values is 'Others'. My requirement is when 'Others' Is selected, it should show a text box(another field).
What is the easiest way to do this ? I guess, I've to write a new visual force page. and somehow have to get IDs of the fields. But what is not clear to me, how can I get picklist field values in visual force page.
How can I use them for show/hide fields?
01-28-2013 08:51 AM - edited 01-28-2013 08:52 AM
I recommend you to use jQuery. You can get the picklist using:
var my_picklist = j$('select[id$=my_picklist_id]');
Play with jQuery a little bit and you will find the way to get the value of the picklist. Then use CSS to display or hide the text box.
Hope this helps,
01-29-2013 02:17 AM
for a sample to show/hide fields ( the rendered statement)
and not everything that can be counted counts.