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
arasuarasu 

How to add dynamic controls(picklist, textfield) in detail pages?

Hi,
 
We are  a lot of requirements from users for dynamic fields population.
For e.g:
If the user selects a Country from the Country drop-down list, then a new drop-down should appear below this to populate the states for that Country.
 
Another example:
If the user selects the option "Other" from the drop-down list, then a new  text field should appear below this with label "If Others, please specify"
 
Please let me know how can this be done using S-Controls? Also please give pointers to some similar examples.
 
Thanks and regards,
Ambili
UsamaUsama
Hi Ambili,
                Build a html Scontrol for these requirements.Use javascript to work with the dropdown list and input text fields. 
 
regards,
Usama Rasheed
 
adamgadamg
Take a look at dependant picklists and see if that does the trick for you:

http://blogs.salesforce.com/features/2006/03/dependent_pickl.html
arasuarasu
Hi,
 
Thanks for your responses.
 
For the S-control option, do we have to build the whole page in HTML with all the fields, or is the S-control invoked only when the value selected from the picklist is "Others".
 
I would really appreciate if you could send some sample code for the same.
 
Thanks and regards,
Ambili
 
UsamaUsama

Hi,

     You have to build whole HTML page with all the fields in it .And for building html page and using salesforce.com ajax tool kit ,refer to the s-controls APi docs.

http://www.salesforce.com/us/developer/docs/ajax/index.htm

regards,