Viewing 5 reply threads
  • Author
    Posts
    • #8975
      conkid
      Member

      Hi All,

      Any checkboxes that save multiple values seem to be broken. All of my old code with multiple checkboxes works, but when multiple items are selected an error is shot out. I notice 0.11.1 is the stable version everywhere. Should fix this ASAP.

      Using the following code as referenced here for checkboxes:
      https://piklist.github.io/docs/tutorials/users/display-users-radio-checkbox-select-list/

      Only change made is to use checkbox instead of select…

      piklist('field', array(
       'type' => 'checkbox'
       ,'field' => 'my_users'
       ,'label' => 'Choose a user'
       ,'attributes' => array(
         'class' => 'text'
       )
       ,'choices' => array(
          '' => 'Choose User'
        )
        + piklist(
         get_users(
           array(
            'orderby' => 'display_name'
            ,'order' => 'asc'
           )
           ,'objects'
         )
         ,array(
           'ID'
           ,'display_name'
         )
        )
      ));

      See the error:

    • #8977
      conkid
      Member
      This reply has been marked as private.
      • #8978
        Steve
        Keymaster
        This reply has been marked as private.
    • #8984
      conkid
      Member

      Steve can you confirm the error?

    • #8991
      Steve
      Keymaster

      @conkid– Your code is working for me. I can select multiple users and they save. The only one I can’t select is “Choose User” because you set the key as empty.

      Attachments:
      You must be logged in to view attached files.
    • #9049
      conkid
      Member

      Steve – I can select multiple boxes but I’m still seeing this error displayed through debug — Thoughts?

      Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in /app/public/wp-content/plugins/piklist/includes/class-piklist-form.php on line 1202 Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in /app/public/wp-content/plugins/piklist/includes/class-piklist-form.php on line 1202

    • #9050
      conkid
      Member

      And another additional error in admin – piklist – settings

      Piklist Settings
      Warning: Invalid argument supplied for foreach() in /app/public/wp-content/plugins/piklist/parts/shared/admin-workflow.php on line 82

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