February 1, 2017 at 2:22 am #7775
I’d like to be able to create a Dashboard QuickPress/Add New Post widget equivalent for a CPT that I have created with Piklist.
From the looks of it I’ll need to create a
forms/part for the form, and use a shortcode in a
dashboard/part to load it. Is this correct?
I essentially want it to be handled in the same way as a standard Add New post submission where it submits to
post-new.php, only from a widget, which means I’ll need the standard hidden fields that are populated on the standard form (ie. nonce, user-id, post-author etc). Is there a quick way to build these or do I need invoke
I’ve gotten as far as:
/* Action: post-new.php Capability: edit_posts Network: false */ piklist( 'field', array( 'type' => 'text', 'field' => 'post_title', 'scope' => 'post', 'label' => 'Title' ) ); <the same custom fields I have in my CPT metaboxes> piklist('field', array( 'type' => 'submit', 'field' => 'submit', 'value' => 'Submit' ));
My apologies if I have missed the documentation for this somewhere.
February 9, 2017 at 11:18 pm #7782
@solace– You got it right. Build a FORM, and use the auto-generated Shortcode to but in the Dashboard widget.
February 10, 2017 at 12:04 am #7783
Thanks. And to confirm, I need to create a
field()for each of standard hidden fields manually? No shortcut for this?
February 10, 2017 at 12:10 am #7784
You must be logged in to reply to this topic.