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
Livia PimentelLivia Pimentel 

Can users choose how many fields appear?

Hello, everyone.

Is it possible to create a Visualforce page in which the user chooses how many fields appear? For instance, let's say that initially there is a field named "quantity of products", and the user chooses 3. So, after that, 3 fields appear:

Product 1: __
Product 2: __
Product 3: __


Thanks in advance.

 
AbhinavAbhinav (Salesforce Developers) 
Check this:

Rerender based on selectList option using Apex in Salesforce

https://www.infallibletechie.com/2012/12/rerender-based-on-selectlist-option.html

https://www.infallibletechie.com/2013/03/how-to-display-custom-button-when.html

Thanks!
Livia PimentelLivia Pimentel
Hi, Abhinav. Thank you for your reply.
It seems that it is possible to achieve this objective by using a for loop inside the find funcion? For instance, we could use this loop to show "n" custom input fields?
 
AbhinavAbhinav (Salesforce Developers) 
yes I mean you can customise your logic and rerender upon selection.

If that helps mark it as besr answer.

Thanks!