Posts [ 3 ]

Topic: Form submission with multiple records

I'm trying to create a utility for importing an address book into my rails app. Using FasterCSV, I want to pull rows off an uploaded file and show the user a page that lists each contact and their details. Here, the user should interact with the page to select which contacts to save to the database. Then, submission of the form processes the selections, saving the appropriate contacts to the database.

My trouble lies in properly constructing the form and its subsequent processing. How do I appropriately name and id form elements so that multiple contacts can be passed to the app, and each contact can be saved to the db?