Tagged: add-more, file upload
- This topic has 4 replies, 2 voices, and was last updated 6 years, 3 months ago by
Steve.
-
AuthorPosts
-
-
October 21, 2015 at 2:35 am #4643
mcmasterMemberI’m running 0.9.9.4. I have an add-more group with 4 fields: text, file upload (PDF), editor, and file upload (image). The code works, but the labels for the two file uploads are placed in the area between the group being edited and the following group, instead of being located with the upload buttons.
I’ve attached the code and a screenshot. The problem persists regardless of whether I set ‘template’ to be ‘field’. Also, re-ordering the fields within the group makes no difference.
HTH,
DonnaAttachments:
You must be logged in to view attached files. -
October 21, 2015 at 2:36 am #4645
mcmasterMemberSince it won’t allow me to upload the .php file, here’s the field definition:
piklist('field', array( 'type' => 'group', 'field' => 'newsletter_archive', 'label' => 'Newsletter Archives', 'description' => 'Each archive includes an image, title and section for highlighting the content of the newsletter.', 'columns' => 12, 'add_more' => true, 'template' => 'field', 'fields' => array( array( 'type' => 'text', 'field' => 'newsletter_archive_title', 'label' => 'Issue Date', ), array( 'type' => 'file', 'field' => 'newsletter_file', 'label' => 'Upload or choose a PDF', 'options' => array( 'modal_title' => 'Add File(s)', 'button' => 'Add', ), ), array( 'type' => 'editor', 'field' => 'newsletter_highlights', 'label' => __( 'Highlights of this issue' ), 'options' => array ( 'wpautop' => true, 'media_buttons' => false, 'tabindex' => '', 'editor_css' => '', 'editor_class' => '', 'teeny' => false, 'dfw' => false, 'tinymce' => true, 'quicktags' => true, ), ), array( 'type' => 'file', 'field' => 'newsletter_image', 'label' => 'Add a cover image', 'options' => array( 'modal_title' => 'Add File(s)', 'button' => 'Add', ), ), ), )); -
October 21, 2015 at 3:51 am #4652
-
October 21, 2015 at 3:13 pm #4655
mcmasterMember@Steve, thanks for the reminder about columns. I must confess I’ve never taken the time to figure out how they work. :-/ Will do that today!
-
October 21, 2015 at 3:21 pm #4656
SteveKeymasterIt’s a 12 column grid system. Let us know if you have any questions.
-
-
AuthorPosts
- You must be logged in to reply to this topic.