Viewing 3 reply threads
  • Author
    Posts
    • #7110
      mandelkind
      Member

      I’ve got a group field for every user which is defined as follows:

      piklist('field',array(
             	'type' => 'group',
             	'field' => 'closing_balances',
             	'label' => __( 'Abschluss', 'toggle' ),
             	'add_more' => true,
             	'fields' => array(array(
             		'type' => 'select',
             		'field' => 'accounting_period',
             		'label' => __( 'Zeitraum', 'toggle' ),
             		'columns' => 4,
             		'value' => '',
             		'choices' => array( '' => __( 'Wähle Zeitraum', 'toggl' ) )
             			+ ( piklist( get_terms('accounting_period',array(
             				'hide_empty' => false
             			)),
             			array( 'term_id', 'name' )
             		))
      
             	), array(
             		'type' => 'number',
             		'field' => 'closing_balance',
             		'label' => __( 'Saldo', 'toggle' ),
             		'columns' => 8
             	))
      ));

      In the database I can see, there is information stored for a given user. I can see the following (table wp_usermeta):

      meta_key = closing_balances
      meta_value = a:2:{s:17:"accounting_period";a:1:{i:0;i:16;}s:15:"closing_balance";a:1:{i:0;d:1160.01;}}

      But unfortunately, when I edit the user the group field is empty (see attached screenshot).

      Do you have any clue why? I know this used to work earlier, but for some reason now it does not anymore 🙁

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

      @mandelkind– Are you using the latest version of Piklist? I believe this was an issue in a past version.

    • #7166
      solace
      Participant

      Hi,

      I believe I have the same issue (if not let me know, I’ll open a new ticket). I have a repeater group as part of a custom post type. The serialised data is being saved, and I can fetch it manually, but it’s not repopulating in the group field.

      I only just downloaded Piklist and am using 0.9.9.9.

      A standard Piklist metabox persists and loads without issue on the same page. And I have also copied one of the demo repeater group fields to test and it’s doing the same thing.

      The field is being executed outside of the Piklist folder structure in a regular WordPress template.

      Thanks

    • #7167
      solace
      Participant

      That was infuriating. :/


      @mandelkind
      Try removing:

      'field' => 'closing_balances',

      I now have a different problem where I get a duplicate field in each row in my repeater. ie. A 3 field group with 3 rows = 9 fields in each row. But that’s a separate ticket.

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