Skip Navigation

[Resolved] How can I create an Image Picker for a custom cell type?

This support ticket is created 6 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 6 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#1074903

Tell us what you are trying to do?
I'm creating a custom cell type that users can add to their layout. I'd like to include an image picker from the media library, similar to the one that exists for the "Image cell" included in Layouts.
I already created a new cell type that can take texts and URL, but since the image will be on the WP media library, I'd like to show them an image picker.

Is there any documentation that you are following?
https://toolset.com/documentation/programmer-reference/layouts-cells-api/

Is there a similar example that we can see?
The Image cell included in Layouts.

What is the link to your site?
hidden link

#1075149

Hi, I don't have a simple script to offer that will help you set this up, but here's the existing code for an image cell: /wp-content/plugins/layouts/inc/cell_types/wpddl.cell_imagebox.php

This code may provide some insight into how the current image cell works, and then you can combine this functionality with the functionality of your existing URL and text inputs.