Viewing 5 reply threads
  • Author
    • #1349

      I’m developing a slideshow plugin and have incorporated piklist into the plugin itself because of the huge amount of time and code it can save me. I have, however, run into a problem:

      What I would like to do is create a group of repeatable meta boxes where the group contains two fields – an image upload field (that uses the media uploader) and a text field to add a url that the image will link to.

      However, when making a file upload field that uses the media uploader, the add_more option seems to automatically turn off. This seems to be – from what I have discovered – because the media upload field allows you to upload multiple images. The issue I have is that I don’t see a good way to add a text field that relates to a specific image that was uploaded in order to give it a URL to link to.

      Is there something that I am overlooking? Or another way to accomplish what I an looking to do? I know that I could add a field to the media meta for a user to input a URL there after they click to choose the image from the media manager, but I would rather do it the other way. Any suggestions?

    • #1350

      @taishiziyi– Can you send us the code you are using to create this field?

    • #1351

      Sure. Here you go (I anonymized some of it for placeholders here, but nothing material has been changed):

      Title: Slideshow
      Post Type: plugin_name
      Order: 0
      piklist( 'field', array(
      	'type'			=> 'group',
      	'field'			=> 'slides_info',
      	'add_more'		=> true,
      	'label'			=> 'Slide Images',
      	'description'	=> 'Add the slides for the slideshow.  You can add as many slides as you want, and they can be drag-and-dropped into the order that you would like them to appear.',
      	'fields'		=> array(
      		'type'			=> 'file',
      		'field'			=> 'slide_image',
      		'scope'			=> 'post_meta',
      		'label'			=> __( 'Add/Edit Image', 'plugin-text-domain' ),
      		'description'	=> __( 'Use the media uploader to add, select, or edit an image to use as a slide.', 'plugin-text-domain' ),
      		'options'		=> array(
      			'modal_title'	=> __( 'Add/Edit Image', 'plugin-text-domain' ),
      			'button'		=> __( 'Add/Edit', 'plugin-text-domain' )
      		'type'			=> 'text',
      		'field'			=> 'slide_url',
      		'scope'			=> 'slide_image',
      		'label'			=> 'Image Link URL',
      		'description'	=> 'If the slide should have a link, enter the URL for the link here.'
      	'on_post_status' => array(
      		'value' => 'lock'
    • #1397

      I know you guys are incredibly busy, but I was wondering if anyone had a chance to take a look and see what I might have been missing here?

      Thanks for all your help!

    • #1399

      @taishiziyi– This is something that we need to work on since it’s not 100% yet. We have some cool ideas for this type of field. Unfortunately, it may be a while before this is done.

    • #1589

      Hi Guys, any idea when this might be supported? It would in my humble opinion really make piklist even more killer, so many ways this feature would come in handy.

Viewing 5 reply threads
  • You must be logged in to reply to this topic.