- This topic has 8 replies, 3 voices, and was last updated 6 years, 5 months ago by
Steve.
-
AuthorPosts
-
-
March 30, 2015 at 10:52 pm #3543
upsideMemberSo I’ve created an add-more group with a file upload field and two text fields. When I try to save page the image does not save. If I try to add a second add more field and add the image there the image still does not save. The text fields do save properly. Here is the code that is creating the add more metabox:
piklist('field', array( 'type' => 'group' ,'columns' => 12 ,'field' => 'box_repeater' ,'add_more' => true ,'fields' => array( array( 'type' => 'file' ,'field' => 'upload_basic' ,'scope' => 'post_meta' ,'label' => __('Add File(s)','piklist') ,'description' => __('This is the basic upload field.','piklist') ,'options' => array( 'basic' => true ) ) ,array( 'type' => 'text' ,'field' => 'tc_box_title' ,'columns' => 6 ,'attributes' => array( 'placeholder' => 'box title' ) ) ,array( 'type' => 'text' ,'field' => 'tc_box_url' ,'columns' => 6 ,'attributes' => array( 'placeholder' => 'box url' ) ) ) ));Thanks for your help!
-
March 31, 2015 at 10:28 am #3546
SteveKeymaster@upside– Welcome to the Piklist community!
Bug confirmed! Seems to be an issue with the basic file field in an add_more.
I was able to get it working with the Media Upload field using our latest beta which I emailed to you. Then use this code:
piklist('field', array( 'type' => 'group' ,'field' => 'box_repeater' ,'add_more' => true ,'fields' => array( array( 'type' => 'file' ,'field' => 'upload_basic' ,'columns' => 12 ,'label' => __('Add File(s)','piklist') ,'description' => __('This is the basic upload field.','piklist') ,'options' => array( 'basic' => false ,'multiple' => false ) ) ,array( 'type' => 'text' ,'field' => 'tc_box_title' ,'columns' => 6 ,'attributes' => array( 'placeholder' => 'box title' ) ) ,array( 'type' => 'text' ,'field' => 'tc_box_url' ,'columns' => 6 ,'attributes' => array( 'placeholder' => 'box url' ) ) ) )); -
March 31, 2015 at 3:14 pm #3547
upsideMemberSteve you guys totally rock! I’ve been using Piklist for a while now and this is the first time I’ve used your support forum and it seems like your support is as awesome as Piklist itself! I was able to get this to work properly with your code and the latest beta. Thanks again for the fast response and for making Piklist. It is such an awesome tool.
-
March 31, 2015 at 3:20 pm #3548
SteveKeymaster@upside– Glad to help!
We would appreciate it if you could tell the world how awesome Piklist is by leaving us a 5 Star review on WordPress.org. It really helps promote Piklist.
Thanks!
-
April 9, 2015 at 10:10 pm #3615
upsideMember@steve I went ahead and rated Piklist 5 stars on WordPress.org. I love Piklist its changed how I look at problems and what I think is possible in WordPress.
I’m having some trouble getting the add-more fields to display. I wound up setting up a test add-more like the basic one in the user guide and I’m getting some weird error messages in the debug log. I’ve got the following code in the page template:
// Get field data $exercise = get_post_meta($post ->ID, 'exercise', true); // Get your custom template part: addmore-workout-template.php piklist(get_stylesheet_directory() . '/addmore-whatdo', array('data' => $exercise, 'loop' => 'data'));And there is an addmore-whatdo.php file in the theme folder. It looks like it’s trying to go into another Piklist plugin first to find the template and then going to the correct url after? Any idea why this would be happening?
PHP Warning: include(/Users/TC/npsa/WordPress/wp-content/plugins/npsa-quotes/parts/http://hostnpsa:8888/wp-content/themes/NPSA-theme/addmore-whatdo.php): failed to open stream: No such file or directory in /Users/TC/npsa/WordPress/wp-content/plugins/piklist/includes/class-piklist.php on line 374 -
April 10, 2015 at 11:09 am #3624
-
August 18, 2015 at 5:04 pm #4232
nate9024MemberA new version just came out today (0.9.4.28) but this has not fixed the issue with file uploads saving.
Here is my code:
piklist('field', array( 'type' => 'group' ,'field' => 'downloads' ,'label' => __('Files PDF') ,'columns' => 12 ,'add_more' => true ,'fields' => array( array( 'type' => 'file' ,'field' => 'download_image_pdf' ,'multiple' => 'multiple' ,'label' => 'Image/icon and PDF file' ,'description' => __('Upload your image (234x126px) and PDF file') ), array( 'type' => 'text' ,'field' => 'download_title' ,'label' => 'Download text' ,'description' => __('Appears underneath the image') ) ) ));I know this is a little different than the original post because this code allows for multiple file uploads within the addmore. Do you have any suggestions on how to allow for them to save? Currently it does not allow saving of the files, text field, or the positioning/order of the addmore elements.
-
August 18, 2015 at 9:40 pm #4233
nate9024MemberI apologize – this was not an error with Piklist. It was an error with my host’s caching which was causing the save problems. Please disregard my previous post; it is working fine!
-
August 19, 2015 at 10:08 am #4234
-
-
AuthorPosts
- The topic ‘Add more group with file upload not saving’ is closed to new replies.