This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

cjs3434
cjs3434

Hi Everyone, I'm having trouble registering a form plugin I have this in my plugin reg file:

 public function registerFormWidgets()
{
    return [
        '\Widgets\ImageUploadWithLink' => [
            'label' => 'Image upload with link',
            'code'  => 'imageuploadwithlink'
        ]
    ];
}

Then in my fields.yaml I have:

images: label: Images type: imageuploadwithlink mode: image imageHeight: 150 imageWidth: 250

Then in the widget file ImageUploadWithLink.php I have: use Backend\Classes\FormWidgetBase;

class ImageUploadWithLink extends FormWidgetBase { public function widgetDetails() { return [ 'name' => 'Image uplaod with link', 'description' => 'Renders a code editor field.' ]; }

public function render() {}

}

The directory structure I have is /plugins/me/myplugin/widgets/imageuploadwithlink

Thanks in advance

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.