I'm new to Civicrm PHP and extension development so I'm sorry if this is a dumb question. ^-^
I'm making an extension that creates a new custom field group, the custom field group is meant to replicate the fields of a contribution (so it has payment method, amount, currency type, ETC).
The problem is the financial type id field, unlike payment method there isn't an option group that I can link the custom field to.
I've made a work around by creating an option group, updating the values inside to copy any changes made to the financial type table, while it's somewhat functional it's messy, breaks my site sometimes and has caused me hours of work fixing it (I've had to make checks in install, uninstall, enable, disable, postCommit hooks)
Is there a way I can add it to cause less bugs/errors like the contribution form, or should I just stick with my current work around and optimize it?
Help would be appreciated! I've been working on this extension for nearly a month atp haha ^-^