I’m creating a generic form LiveComponent that will work for creating and editing a few different kinds of schemas that share some common fields.
In order to do that, I need to be able to pass functions such as Items.change_item/1,2
, Items.create_item/1
, and Items.update_item/2
.
If I’m barking up the wrong tree by passing in the functions like this, what other solution would be suitable for building a generic form like this? I’ve thought about creating a common changeset for the shared fields, but not sure that’s the correct solution either.