I have a two Symfony forms:
ShoppingListForm ShoppingListItemForm
I'm embedding the ShoppingListItemForm inside the ShoppingListForm many times. ie A shopping list contains many items.
So the ShoppingListItemForm consists of two widgets:
item_id (checkbox) shopping_list_id (hidden - foreign key)
What I would like to do is delete the corresponding ShoppingListItem object if the object exists and the checkbox is left unchecked.
I'm not sure how this delete would occur? Would I use a post validator to see which fields have/haven't been checked? I'm a bit lost on this one.
Thanks in advance.