Let me start by saying I am aware of this module: https://www.drupal.org/project/commerce_custom_product
This module works great for custom line item types that need to reference a product, however (correct me if I am wrong) this module can't be used to create custom line item types that do NOT reference a product.
I need a custom line item type, that doesn't reference a product. Which lead to the discovery of this:
hook_commerce_line_item_type_info() I am able to successfully create a custom line item type, and have it automatically come with the Unit and Total price fields automatically.
All is well so far...
Now if I use the Drupal UI to add a custom field (e.g. an entity reference field, not a product reference field) to this custom line item type, I am able to do this without issue. I can add as many fields as I want.
Now for the problem...
However, when I use the admin order form and try to manually add this custom line item type to an order, the custom field(s) don't show up in the form.
I see from the documentation that I could implement the
add_form_submit callbacks. But I figured any fields added through the UI would automatically show up on the form(s).
What is going on here? Must I implement the form code-side for all fields on the custom entity type?