You need to sign in to do that
Don't have an account?
Imtiyaz Chougle
Dynamic number of rows
I want to create a visual force page that has three fields.
- A dropdown list asking the user to select a number from 1 to 5.
- Display two text fields for the user to populate "n" number of times depending on the number selected by the user (If the user selects 2, display 2 rows, if the user selects 4, display 4 rows, etc).
Refer below links which has sample code and try to modify according to your requirements.
http://www.infallibletechie.com/2012/06/dynamically-adding-rows-in-apex.html
https://sfdcpanther.wordpress.com/2017/09/24/dynamically-add-rows-in-visualforce-page/
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
Best Regards
Sandhya
I am looking for something different. I want the user to select a number from a dropdown box (between 1 and 10). Then, I want to display "n" number of rows, where "n" is the number selected by the user.
I am new to Salesforce and have not been able to find the answer on how to do that.
Regards,
Imtiyaz.