Say I have a table of tradesmen, and a table of job descriptions ("plumber", "electrician", etc)
I would like to let users search for tradesmen by job description.
Ideally, the form would display all the available job descriptions with a checkbox next to each one, so the users could pick several job descriptions at the same time.
The problem is, I don't know how many job descriptions there will be (there's supposed to be a maximum of 30) and what I would like to do is:
Query the database and get all the available job descriptions
Loop through the records
For each record in the loop, create a checkbox in the form.
Is there any way of doing this?
If it was straightout php I guess I could echo everything onto the page, but I'm not sure how to do this in SilverStripe? Any suggestions?