Recently I built a SafeCracker form that will never see the light of day. It was beautiful but the client didn't want to use it... But I digress. This for had your basic sign up form and then allowed you to add an additional attendee. The form was designed so that if a parent was bringing children they could add them by filling in a couple of fields and then clicking on Add Row for any additional children. Initially I created this functionality in the normal way by just adding the following to my code:
But that did not give me the custom look that I wanted. Plus, my matrix field actually have 8-9 fields in it so I wanted to break apart the Matrix field so that I could lay out the fields in a way that would make more sense for the user. I searched and searched the Matrix forum for hints on how to do this and found some info. In an effort to make this easier for my future self, here is an example of how you would do that:
Notice that in the name of the fields there is a slight change from the normal parameter that you use to pass values to SafeCracker. In these you have cf_registration_add_attendees[row_new_0][col_id_7]. The col_id_7 points to the column ID of that particular field in the Matrix Field. I believe I went old school and used Firebug to inspect the Matrix Field when I was displaying the whole field in the SafeCracker form (for testing purposes).
Which attaches itself to the add/remove links from above.