Setting a custom field when creating a form
I'm trying to add an additional field when creating a form to specify different types of forms for a custom module that I'm working on. The functionality I'm looking for is similar to adding custom fields to a page and setting the value of those fields when creating a page, however, it seems like the UI option for adding custom fields is not available for forms. I've tried to replicate this functionality in code by adding a custom field to the FormDescription type and I'm trying to set that field with a checkbox that I've added on the FormsBackendInsert view. However, I cannot get the checkbox to set the field. Is there something I am missing? As a side-note, I have also tested a custom string field with a TextFieldElement which doesn't update the custom field either.
Added a custom field with the following code:
Added the ChoiceFieldElement under advanced settings > Forms > Controls > FormsBackend > FormsBackendInsert > Sections > MainSection > Fields.