Tagged: CPT, on_post_status
- This topic has 2 replies, 2 voices, and was last updated 6 years, 1 month ago by
ccjeagle.
Viewing 2 reply threads
-
AuthorPosts
-
-
January 8, 2016 at 9:28 pm #5528
ccjeagleMemberHi,
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') )); -
January 10, 2016 at 3:37 pm #5541
-
January 11, 2016 at 7:35 am #5551
ccjeagleMember@Steve- Thanks much for checking!
-
-
AuthorPosts
Viewing 2 reply threads
- You must be logged in to reply to this topic.