Hi,
I’m trying to port an EE2 plugin I created to EE3.
I’ve got the vanilla fieldtype working fine but I’m having an issue when trying to get it to work in a grid field.
In my display_field method I have the following code:
$file_picker_link = ee('CP/FilePicker')->make()
->setDirectories($allowed_directory)
->getLink(lang('wscropper:select_file'))
->setAttribute('class', 'btn action ws-cropper-load-filepicker')
->asThumbs()
->enableFilters()
->enableUploads()
->render();
...
$fdata['file_picker_link'] = $file_picker_link;
return ee('View')->make('wscropper:ft_display')->render($fdata);
and in my view I have:
<?php echo $file_picker_link; ?>
When I click the file upload link I just get a blank modal.
If I have a vanilla version of my field in the field group and click the link then the modal works fine and then I can click on my grid field version of the link and it works. Gif of that here:
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.