I am in the process of creating a custom field type for a website. Previously, I used Gravity Forms, which offers robust support for extending fields via the GF_Field class and the Settings API (reference: [Gravity Forms documentation]). Recently, I migrated to Forminator Forms and am aiming for similar extensibility. I am able to successfully register a new field by extending the Forminator_Field class and using the forminator_fields hook.
However, I’ve hit a roadblock with the form builder. Since it’s built in React and the plugin only includes compiled JavaScript files, I am unable to locate or access the source code required to integrate and render our custom field properly in the builder. This has made it difficult to provide a full user interface for the new field.
Could you please guide me on how I can implement this functionality or whether the source code for the form builder is available anywhere for extension purposes?
Thank you so much for your input and the sample you provided.
I’ve managed to render the custom field on the frontend and also in the shortcode preview within the backend earlier as well. However, the issue I’m facing is specifically with the form builder. I’m unable to figure out how to add components or scripts similar to what’s implemented for other fields in the builder.
I’ve attached a screenshot of the Email field for reference. Could you please help me understand if it’s possible to add a similar modal, settings panel, and field options for a custom field?
While I’ve noticed the structure of React components inside the built form-script.js file, I couldn’t determine whether it’s dynamically driven from PHP or hardcoded in JS. If it’s hardcoded, is there any supported way to inject or register a custom field along with its settings UI?
Unfortunately, you cannot natively inject a new field into the drag-and-drop UI in the Forminator visual builder using public APIs because, at this moment, there is no public React component registration system or slot for custom fields inside the builder.
You can still register your custom code with PHP and it will be working in frontend and store data in the submission.