Tagged: add_more
- This topic has 9 replies, 3 voices, and was last updated 6 years, 6 months ago by
Steve.
-
AuthorPosts
-
-
December 10, 2014 at 3:00 pm #3029
cosmocanuckMemberHi again!
Sorry, I seem to keep running into unfathomable issues trying to set up a couple of grouped fields.
I’m getting weird display of additional empty field boxes on the back end, as per my attached screen shot. Every time I “Update” or refresh the page, I get a bunch more.
Additionally, the images and respective captions are not being kept together, the images are being shown in a group.
(And the image thumbnail display is weird, but I can live with that… perhaps it’s something else worth investigating though.)
Here’s my code:
piklist('field', array( 'type' => 'group' ,'field' => 'nutrition_facts_boxes' ,'label' => __('Nutrition Facts') ,'description' => __('Upload the Nutrition Facts image.') ,'add_more' => true ,'fields' => array( array( 'type' => 'file' ,'field' => 'nutrition_facts' ,'label' => __('Nutrition Facts','piklist') ,'options' => array( 'basic' => true ) ) ,array( 'type' => 'text' ,'field' => 'nutrition_facts_caption' ,'columns' => 12 ,'label' => __('Caption - only if more than one box','piklist') ) ) ));My field names are not duplicated anywhere else, and I’ve looked and looked but can’t find anything wrong with the code. Thanks for any suggestions you can provide!
Adam
Attachments:
You must be logged in to view attached files. -
December 10, 2014 at 6:44 pm #3034
cosmocanuckMemberHi again! Here’s some late-breaking news on this developing story…
I’ve realized that I don’t need to group a “Caption” field with my file upload field after all; I can just use the built-in caption functionality for WP uploads. But before I dismantle my group and delete my “nutrition_facts_caption” text field, I guess it would be good to know why the error described is happening.
But also…
Now the thumbnail display issues, as seen in my attached graphic, become a little more pertinent, I think. I’m assuming I should be able to click that thumbnail and get to the standard page where I set the title, caption, etc. of my uploaded file. But I can’t seem to do that.
I can track it down by file name over in the Uploads area, but that seems awfully cumbersome if there’s a possible easier way to just click through from the thumbnail while I’m editing.
Let me know… thanks!
-
December 10, 2014 at 11:03 pm #3039
SteveKeymasterJust pushed v.0.9.4.24 to WordPress.org. This upgrade should fix your image issues.
Clicking on the image should bring you back to the upgrade screen.
-
December 11, 2014 at 10:49 am #3045
cosmocanuckMemberThe thumbnail’s now correctly shown, however clicking it doesn’t do anything for me.
Additionally, I’m getting nested “add more” icons/sections for some reason? (See 2nd screen shot attached).
If I click the outer one, I get additional blank areas (See 1st screen shot.)
Here’s the entirety of my code for the uploader:
piklist('field', array( 'type' => 'file' ,'field' => 'nutrition_facts' ,'add_more' => true ,'label' => __('Nutrition Facts','piklist') ,'options' => array( 'basic' => true ) ));Thanks for looking into this.
Attachments:
You must be logged in to view attached files. -
December 11, 2014 at 1:33 pm #3053
SteveKeymasterThere seems to be a bug with this type of field config and the BASIC uploader. If you remove the ‘basic’ it should work:
,'options' => array( 'basic' => true ) -
December 11, 2014 at 8:34 pm #3065
cosmocanuckMemberThat’s definitely better. I notice that clicking the image now takes me to the Add Media page, but that’s not all that helpful, as I still have to search for the image – it would be great if it took me right to the “Edit Media” page for that particular image, where I can add the caption, etc. But, something for the future I guess!
-
December 11, 2014 at 10:03 pm #3067
SteveKeymasterThis is the way the default WordPress media uploader works. Go to add new Post, add a featured image and then click on it again. Should be the same UX.
-
December 12, 2014 at 12:21 am #3068
cosmocanuckMemberAha! OK, thanks.
-
August 13, 2015 at 4:02 am #4192
KennyMemberThe default WordPress media uploader will highlight the featured image where as the file upload field only brings up a media uploader with nothing selected. Is there any way for it to highlight the image that was clicked like it does with featured images?
-
August 13, 2015 at 9:49 am #4195
SteveKeymaster@Kenny– Welcome to the Piklist community!
I’m not perfectly clear on what you’re asking. Can you post a screenshot?
-
-
AuthorPosts
- You must be logged in to reply to this topic.