Tagged: 

Viewing 2 reply threads
  • Author
    Posts
    • #4012

      Hi Steve,

      I have a group of fields within a metabox but the last field is not aligning with the others – see attached screenshot. The code listing is below – it doesn’t matter what field is the last one in the group, it is always misaligned.

      Thanks,
      Karen

      <?php

      /*
      Title: Job References
      Post Type: job
      Order: 10
      */

      piklist(‘field’, array(
      ‘type’ => group
      ,’list’ => ‘false’
      //,’label’ => __(‘Job References’)
      ,’fields’ => array(
      array(
      ‘type’ => ‘text’
      ,’field’ => ‘docket_num’
      ,’label’ => __(‘Job Ref’)
      ,’value’ => ‘docket_num’
      ,’attributes’ => array(
      ‘class’ => ‘text’
      ,’required’ => ‘required’
      ,’readonly’ => ‘readonly’
      ,’size’ => ’15’
      )
      )

      ,array(
      ‘type’ => ‘text’
      ,’field’ => ‘job_num’
      ,’label’ => __(‘Job Number’)
      ,’value’ => ‘job_num’
      ,’attributes’ => array(
      ‘class’ => ‘text’
      ,’required’ => ‘required’
      ,’readonly’ => ‘readonly’
      ,’size’ => ’15’
      )
      )

      ,array(
      ‘type’ => ‘text’
      ,’field’ => ‘job_status’
      ,’label’ => __(‘Status’)
      ,’value’ => ‘job_status’
      ,’attributes’ => array(
      ‘class’ => ‘text’
      ,’required’ => ‘required’
      ,’readonly’ => ‘readonly’
      ,’size’ => ’15’
      )
      )

      ,array(
      ‘type’ => ‘text’
      ,’field’ => ‘job_date’
      ,’label’ => __(‘Job Date’)
      ,’value’ => ‘job_date’
      ,’attributes’ => array(
      ‘class’ => ‘text’
      ,’required’ => ‘required’
      ,’readonly’ => ‘readonly’
      ,’size’ => ’15’
      )
      )

      ,array(
      ‘type’ => ‘text’
      ,’field’ => ‘manifest_num’
      ,’label’ => __(‘Manifest Number’)
      ,’value’ => ‘manifest_num’
      ,’attributes’ => array(
      ‘class’ => ‘text’
      ,’required’ => ‘required’
      ,’readonly’ => ‘readonly’
      ,’size’ => ‘8’
      )
      )

      ,array(
      ‘type’ => ‘text’
      ,’field’ => ‘customer_po_num’
      ,’label’ => __(‘Customer PO Number’)
      ,’value’ => ‘customer_po_num’
      ,’attributes’ => array(
      ‘class’ => ‘text’
      ,’required’ => ‘required’
      ,’readonly’ => ‘readonly’
      ,’size’ => ’20’
      )
      )

      ,array(
      ‘type’ => ‘textarea’
      ,’field’ => ‘notes’
      ,’label’ => __(‘Notes’)
      ,’value’ => ‘notes’
      ,’attributes’ => array(
      ‘class’ => ‘text’
      ,’required’ => ‘required’
      ,’readonly’ => ‘readonly’
      )
      )
      )
      ));

      ?>

      Attachments:
      You must be logged in to view attached files.
    • #4014

      All sorted now by adding columns to each field – thanks

    • #4018
      Steve
      Keymaster

      @karenoconnell– Yes, the columns parameter is imperative when working with group fields.

      Closing ticket.

Viewing 2 reply threads
  • The topic ‘Last field in group misaligned’ is closed to new replies.