Custom Form field type
-
Hi there, I’m trying to find my way of adding a custom form field type for my project. There is no documentation whatsoever unfortunately and the OOP pattern you guys use is rather confusing.
What I do is create a custom class:
namespace ElementorPro\Modules\Forms\Fields;
use Elementor\Widget_Base;
use ElementorPro\Modules;
use ElementorPro\Modules\Forms\Classes;
use Elementor\Controls_Manager;
use ElementorPro\Modules\Forms\Widgets\Form;
use ElementorPro\Plugin;class Upload_Cropper extends Field_Base {
/* props and methods … */
}… And then I try to instantiate it but fail miserably:
\Elementor\Plugin::instance()->Module->add_form_field_type( ‘uploadcropper’, new Fields\Upload_Cropper() );
Could you please point me into the right direction?
- The topic ‘Custom Form field type’ is closed to new replies.