- This topic has 6 replies, 2 voices, and was last updated 7 years, 2 months ago by
Steve.
-
AuthorPosts
-
-
November 13, 2014 at 9:37 am #2786
ajayphpMemberHi,
Workflow tab feature is gr8, I am trying with that,
after filled the data in fiels, and press save button,
nothing is saving, even in tab input fields are disappearing.i tried with different post status method. and then save,
even then save button title were changes save to publish (do not know how )could you please tell how can i fix, as all efforts will be waste if noting will
save. this is for custom post type.sample code with file structute:
File: plugin/parts/workflow/gateway.php
<?php /* Flow: Gateways Page: post.php, post-new.php, post-edit.php, admin.php Post Type: biz_gateway Header: true Position: title */ ?>first tab
— File: plugin/parts/workflow/api.php<?php /* Title: Api Order: 20 Flow: Gateways Default: true */ ?> <?php piklist('include_meta_boxes', array( 'piklist_meta_help' ,'piklist_meta_field_api' ,'piklist_meta_field_upload' ,'piklist_meta_field_taxonomies' ,'piklist_meta_field_featured_image' ,'piklist_meta_field_relate' ,'piklist_meta_field_comments' )); /* * you can pass var to file, with location of file to call */ piklist('shared/field-api', array( 'location' => __FILE__ ,'type' => 'Workflow Tab' )); ?>First tab content file:
— File: plugin/parts/shared/field-api.php<?php piklist('field', array( 'type' => 'text' ,'field' => 'gtw_api_url' ,'label' => 'Api Url' ,'description' => "Api Url for this gateway to remote call" ,'attributes' => array( 'class' => 'regular-text' ,'placeholder' => 'Enter Api Url...' ) ,'on_post_status' => array( 'value' => 'save' ) ,'required' => true )); piklist('field', array( 'type' => 'text' ,'field' => 'gtw_api_username' ,'label' => 'Api Username' ,'description' => "Api Username" ,'attributes' => array( 'class' => 'regular-text' ,'placeholder' => 'Enter Api Username...' ) ,'on_post_status' => array( 'value' => 'save' ) ,'required' => true )); piklist('field', array( 'type' => 'text' ,'field' => 'gtw_api_password' ,'label' => 'Api Password' ,'description' => "Api Password" ,'attributes' => array( 'class' => 'regular-text' ,'placeholder' => 'Enter Api Password...' ) ,'on_post_status' => array( 'value' => 'save' ) ,'required' => true )); ?>— like above second and third tab.
is that code file and tab content file location is fine ..?
data is display correctly.— data is not saving, on click save button
— data is not saving when move to another tab
— after save fields not able to edit and input fields disappears.Please guide me in detail please.. i have read your doc not get exact idea
what is missing.Regards
-
November 13, 2014 at 10:53 am #2787
SteveKeymaster@ajayphp– Why are you using
on_post_status? Do you have a custom post status called “save”? Here are the docs onon_post_statusfor clarification > Try removing it.Also, what is this code supposed to do?
piklist('shared/field-api', array( 'location' => __FILE__ ,'type' => 'Workflow Tab' )); -
November 13, 2014 at 2:57 pm #2789
ajayphpMemberHi,
code: +++++++++++
piklist(‘shared/field-api’, array(
‘location’ => __FILE__
,’type’ => ‘Workflow Tab’
));
+++++++++i saw this code in add on piklist example:
it seems calling fields file and passing variable to that file.can we put the fields declation direct here ?
or what is the way to include tab fields content file ?
with this workflow tab ? -
November 13, 2014 at 10:49 pm #2791
ajayphpMemberHi,
could you tell how we bind the tab click event
to trigger save data of previous tabs,also alert on select tab , leave tab or loose / save data,
better if we can save auto.or call tabs content with ajax rather http url request
-
November 14, 2014 at 11:19 am #2792
SteveKeymasterWe use this code in the demo to show the path of the file being used. It doesn’t do anything except display the path:
piklist(‘shared/field-api’, array( ‘location’ => __FILE__ ,’type’ => ‘Workflow Tab’ ));
Workflow tabs currently do not support auto-save or save when switching tabs.
-
November 14, 2014 at 3:07 pm #2795
ajayphpMemberHi,
Pls pls tell me tab content(fields) file location ?
and where you mention in doc about field-group
and what is difference between followings:
+++
piklist(‘field’, array(
‘type’ => ‘group’
,’label’ => ‘Address (Un-Grouped)’
,’description’ => ‘An Un-grouped field. Data is saved as individual meta and is searchable.’
,’fields’ => array(
array(+++
piklist(‘field’, array(
‘type’ => ‘group’
,’field’ => ‘address_group’
,’label’ => ‘Address (Grouped)’
,’list’ => false
,’description’ => ‘A grouped field. Data is not searchable, since it is saved in an array.’
,’fields’ => array(
array(+++
,’add_more’ => true+++
-
November 14, 2014 at 5:14 pm #2796
SteveKeymaster1) WORKFLOW TAB CONTENT: The contents of the Workflow tabs are in regular meta-boxes are settings sections that you already created. This is the code that tells the Tab which DIVs (meta-boxes or sections) to show:
piklist('include_meta_boxes', array( 'piklist_meta_help' ,'piklist_meta_field_api' ,'piklist_meta_field_upload' ,'piklist_meta_field_taxonomies' ,'piklist_meta_field_featured_image' ,'piklist_meta_field_relate' ,'piklist_meta_field_comments' ));2) GROUPED / UNGROUPED: When you define a field (i.e.
'field' => 'address_group'), all other field data is saved in an array withinaddress_group. If you don’t define a field, they are saved separately.
-
-
AuthorPosts
- The topic ‘in workflow tab values are not saving’ is closed to new replies.