21278 Posts in 5728 Topics by 2599 members
General Questions
SilverStripe Forums » General Questions » Number of form field rows dynamically displayed based on number from dropdown field
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 1008 Views |
-
Number of form field rows dynamically displayed based on number from dropdown field

11 September 2010 at 4:08am Last edited: 11 September 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.
-
Re: Number of form field rows dynamically displayed based on number from dropdown field

1 October 2010 at 11:51pm
Hi,
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 http://www.silverstripe.org/multi-form-module/) 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.
Barry
| 1008 Views | ||
|
Page:
1
|
Go to Top |


