Viewing 4 reply threads
  • Author
    Posts
    • #4643
      mcmaster
      Member

      I’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,
      Donna

      Attachments:
      You must be logged in to view attached files.
    • #4645
      mcmaster
      Member

      Since 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',
      			),
      		),
      	),
      ));
    • #4652
      Steve
      Keymaster

      @mcmaster– We were able to reproduce the bug and will get it fixed.

      On a side note (even though it doesn’t fix the problem), you should use the columns parameter when creating group fields since it’s essentially a grid. Something like 'columns' => 12

    • #4655
      mcmaster
      Member

      @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!

    • #4656
      Steve
      Keymaster

      It’s a 12 column grid system. Let us know if you have any questions.

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