Viewing 9 reply threads
  • Author
    Posts
    • #5758
      mplysiak
      Member

      I created two columns and they do not fit in one row. I have attachesd a screenshot of the source. The total width of the columns and the margins is 101.4%

      Attachments:
      You must be logged in to view attached files.
    • #5760
      mplysiak
      Member

      If anyone else is having this issue I added the following line in /piklist/parts/js/piklist.js below line 1500 and it solved my problem. This is a temporary fix but it works! I have also attached a screenshot.

      $(‘div[data-piklist-field-columns]:last-child’).css({‘margin-right’:0});

      Cheers,
      Michael Lysiak
      Owner – Dominant Domains LLC.

      Attachments:
      You must be logged in to view attached files.
    • #5777
      Steve
      Keymaster

      Piklist uses a 12 column grid system. You can easily define the width by using:

      'columns' => '12
      
    • #5783
      mplysiak
      Member

      I understand that (just like bootstrap) but if you look at the code in the screenshot you will see that I have two columns each column=6 for a total of 12 which should be a full row, however, they do not fit in one row because the column width plus the margins for each column total 101.4% causing the second column to wrap onto the next line. This occurs with any number of columns. FYI – I created a widget with grouped text fields, not sure if the field columns are doing the same thing when used on settings pages as well.

    • #5784
      Steve
      Keymaster

      Can you post your field code?

    • #5785
      mplysiak
      Member

      I have already edited it. I also tried to recreate the issue and cannot. Maybe it was a conflict with some other code, a misplaced character, or something flukey. I will check my backups tomorrow and see if by chance the non functional code got backed up in the daily.

    • #5802
      mplysiak
      Member

      I was able to recreate the issue. It seems to be with nested columns. Also group columns do not seem to be working properly. Thanks

      piklist('field', array(
      			'type' => 'group',
      			'label' => $value,
      			'fields' => array(
      				array(
      					'type' => 'group',
      					'field' => 'options',
      					'columns' => 4,
      					'fields' => array(
      
      				array(
      					'type' => 'checkbox',
      					'field' => $key.'-closed',
      					'columns' => 2,
      					'choices' => array(
      						'closed' => 'Closed'
      					)
      				),
      				array(
      					'type' => 'checkbox',
      					'field' => '24hrs',
      					'columns' => 2,
      					'choices' => array(
      						'24hrs' => '24hrs'
      					)
      				)
      				)
      				),
      				array(
      					'type' => 'group',
      					'field' => 'open',
      					'columns' => 4,
      					'fields' => array(
      						array(
      							'type' => 'select',
      							'field' => $key.'-open-hour',
      							'columns' => 2,
      							'choices' => $hours,
      
      						),
      						array(
      							'type' => 'select',
      							'field' => $key.'-open-min',
      							'columns' => 2,
      							'choices' => $mins
      						)
      					)
      				),
      				array(
      					'type' => 'group',
      					'field' => 'close',
      					'columns' =>4,
      					'fields' => array(
      						array(
      							'type' => 'select',
      							'field' => $key.'-close-hour',
      							'columns' => 2,
      							'choices' => $hours,
      
      						),
      						array(
      							'type' => 'select',
      							'field' => $key.'-close-min',
      							'columns' => 2,
      							'choices' => $mins
      						)
      					)
      				)
      			)
      
      		));
      
    • #5820
      Steve
      Keymaster

      @mplysiak– Why do you have groups within groups? What are you trying to accomplish?

    • #5829
      mplysiak
      Member

      I have attached a screenshot of what I would like to accomplish in the end. I would love for there to be an option for a label column with in the future as well, but no biggie. I am also pondering turning the open and close into yet another group and making it an add more. I can achieve the formatting in a widget using divs and so on but on an admin settings page any html I add appears before any of the piklist fields.

      Thanks,

      Attachments:
      You must be logged in to view attached files.
    • #5837
      Steve
      Keymaster

      You may need to add a little css to achieve this. You can use the Piklist HTML field for just labels.

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