Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Number of form field rows dynamically displayed based on number from dropdown field

Go to End

2 Posts   1733 Views


Community Member, 12 Posts

11 September 2010 at 4:08am

Edited: 11/09/2010 4:09am

I've been trying to work out how to create a dynamic booking form within silverstripe that will allow the user to choose the number of candidates to be booked on a course from a dropdown, then display that number of sets of fields for the entry of each candidate's details. I have the silverstripe book and can understand more straightforward forms. Is this kind of functionality possible using forms within silverstripe?

Any help would be gratefully recieved.


Forum Moderator, 1899 Posts

1 October 2010 at 11:51pm


I'd say that this is going to be easier if the two things are not on the same page, then in site because you could have one page with one form (maybe use that collects the number of people and then the next form when you create the FieldSet you can loop the number of required times to create that number of fields. Also place the number of people into a Hiddenfield so this can then be used to save the form data correctly.

Otherwise AJAX will help you do the same on the same page.