Help with Sections

Support General Help with Sections

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2092
    carassiuscarassius
    Participant

    I have an issue where my fields are not displaying correctly in the dashboard and hoping you may be able to shed some light on what is happening?

    In this first image, you can see how the Contact Info section is hidden behind the Tasks section

    And when I move it below the Tasks section, you can see how the fields are there but they break out of the section's div

    #2094
    carassiuscarassius
    Participant

    I was able to fix with adding in some admin css, but that is a work around, not a solution to the problem

    div#p52_contact_contact {
    height: 300px;
    }

    #2100
    Anh TranAnh Tran
    Keymaster

    Can you post your code? I guess the total of columns on some rows does not equal to 12, can you please check that (especially the last row)?

    #2112
    carassiuscarassius
    Participant

    They all have 'columns': 6

    /***************************
    * create contact metaboxes
    ***************************/
    function p52_contact_before_meta_boxes( $meta_boxes ) {
        $prefix = 'p52_contact_';
      
        
        // contact info meta box
        $meta_boxes[] = array(
            'id'       => $prefix . 'contact',
            'title'    => 'Contact Info',
            'pages'    => array('p52-contact'),
            'context'  => 'normal',
            'priority' => 'high',
    
            'fields' => array(            
            
                array(
                    'name'  => 'Company',
                    'id'    => $prefix . 'company',
                    'type'  => 'text',
                    'columns' => 6
                ),
                
                array(
                    'name'  => 'Relationship',
                    'id'    => $prefix . 'relationship',
                    'type'  => 'select',
                    'options' => array(
                        'prospect' => 'Prospect',
                        'lead' => 'Lead',
                        'client' => 'Client',
                        'agency' => 'Agency',
                        'contractor' => 'Contractor',
                        'assitant' => 'Assistant',
                        'supplier' => 'Supplier'
                        ),
                    'placeholder' => 'Choose your relationship',
                    'columns' => 6
                ),
                
                array(
                    'name'  => 'Phone',
                    'id'    => $prefix . 'phone',
                    'type'  => 'text',
                    'columns' => 6
                ),
                
                array(
                    'name'  => 'Email',
                    'id'    => $prefix . 'email',
                    'type'  => 'text',
                    'columns' => 6
                ),
                
                array(
                    'name'  => 'Address',
                    'id'    => $prefix . 'address',
                    'type'  => 'textarea',
                    'columns' => 6
                ),
                
                array(
                    'name'  => 'Postal Address',
                    'id'    => $prefix . 'postal',
                    'type'  => 'textarea',
                    'columns' => 6
                ),
                
                            
            )
        );
    #2137
    Anh TranAnh Tran
    Keymaster

    I was able to test your full code with the FTP details you just sent. However, it looks right in my localhost:

    So strange :(. Can you check again, or please send me the URL of your website so I can have closer look?

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Help with Sections’ is closed to new replies.