Viewing 2 reply threads
  • Author
    Posts
    • #5528
      ccjeagle
      Member

      Hi,

      By following this tutorial and another one, my CPT uses custom status: draft, publish, lock-1, lock-2, lock-3.

      With plugin metabox text field called “First Name”, I set on_post_status to “lock-1–lock-3”.

      My issue happens when I switch the status from lock-1 to lock-2. With lock-1, the field does show value instead of a box. However, when I switch to lock-2 (from lock-1),
      when the field value disappears, and shows a warning “Fist Name is required”.

      Another interesting this is, if it is not “required”, I can’t switch from lock-1 to lock-2. It will automatically go back to “published”, so that I can switch to lock-2.

      I would appreciate if any advise you may provide. Thanks.

          ,'status' => array(
              'draft' => array(
                'label' => 'Draft'
              )
              ,'publish' => array(
                'label' => 'Published'
              )
              ,'lock-1' => array(
                'label' => 'Lock 1'
              )
              ,'lock-2' => array(
                'label' => 'Lock 2'
              )
              ,'lock-3' => array(
                'label' => 'Lock 3'
              )
      
      piklist('field', array(
                  'type' => 'text'
                  ,'field' => 'contact_firstname'
                  ,'label' => 'First Name'
                  //,'required' => true
                  ,'columns' => 3
                  ,'on_post_status' => array('value' => 'lock-1--lock-3')
      ));
    • #5541
      Steve
      Keymaster

      @ccjeagle– Welcome to the Piklist community!

      It looks like you found a bug in the on_post_status ranges. I just tested and value' => 'lock-1' works for me. We’ll get this fixed in the next version of Piklist.

    • #5551
      ccjeagle
      Member

      @Steve- Thanks much for checking!

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