Slow but steady progress
Posted by mholmes on 22 Jun 2009 in Activity log
My excellent but much-more-complicated-than-I'd-predicted cunning plan to make embedded records (records from a related table) editable in the context of a form for editing the parent record, without having to keep going back to the server, or save interim records then remove or change them) is slowly but surely making progress. I have these features working:
- Existing records are stored in hidden fieldsets in full, as well as displayed in table rows.
- Deleting them removes the hidden records, the display rows, and the additional row included for editing or viewing a record in full.
- Editing an existing record, or creating a new record, generates a new editing form with element ids which are all unique, and in the case of an existing record, keyed to that record.
- The
saveEmbeddedRecord()function is mapped out in pseudo-code and some bits are filled in.
Next:
- Finish the
saveEmbeddedRecord()function, which stashes the new values in a hidden fieldset, and make sure that's working reliably. - Write a function for trawling through the hidden fieldsets to create data for submission along with the parent record when it's saved. This will take some thought. Perhaps we should use JSON.
- Move to working on the parent record save function, which incorporates this.