Forum Replies Created
-
AuthorPosts
-
KevinKeymasterHi @mcdonna-
Switch add-more to add_more and it should turn on.
Thanks,
Kevin
KevinKeymaster@hozefasmile-
process_views is an old method, its not in trunk at all. Please re-download and re-install.
Thanks,
Kevin
KevinKeymaster@mcmaster-
The current table is wp_post_relationships (wp_piklist_cpt_relate is the legacy table) and thats where the data in the migration is pulled from. Try running the upgrade script on the latest version and let us know if the problem persists.
Thanks,
Kevin
KevinKeymasterThanks, its fixed in the next release 😉
KevinKeymaster
KevinKeymaster@mcmaster- I think this could be solved by using a different field template. It looks like the add-more is just using template => field and its not clearing the responsive container above it. We will look into any additional help we can give these defaults templates on a later release.
KevinKeymaster@mcmaster- It looks like you have something inserting layout html into your editors?
KevinKeymaster@shayneol-
We actually moved the description on the default field template to the bottom of the field to be more consistent with the wp-admin style guide. However you can change it if you like by defining your own field template or modifying the one being used, in this case ‘post_meta’
Let us know if you need anything else.
Kevin
add_filter('piklist_field_templates', 'my_field_templates'); function my_field_templates($templates) { $templates['post_meta']['template'] = '[field_wrapper] <div class="%1$s piklist-field-container"> <div class="piklist-field-container-row"> <div class="piklist-label-container"> [field_label] [field_description_wrapper] <p class="piklist-field-description description">[field_description]</p> [/field_description_wrapper] </div> <div class="piklist-field"> [field] </div> </div> </div> [/field_wrapper]'; return $templates; }
KevinKeymaster@rachel-
The data in the add-more fields is stored in that order in the database. So in the case of your post meta field, the data is ordered by meta_id, the lowest id being the first item in the add-more field. Let me know if you have any more questions.
Thanks,
Kevin
October 23, 2015 at 7:16 pm in reply to: Critical: Preview while editing metaboxes causes data loss #4722
KevinKeymaster@mcmaster-
I wasn’t able to reproduce this on a fresh install. This was the only field on my edit screen, the preview worked as expected and several edits and updates worked as expected. If you would like to send credentials for us to login we would be more than happy to take a look.
Thanks,
Kevin
KevinKeymaster@mcmaster-
This is fixed in the next beta release.
Thanks,
Kevin
KevinKeymasterHi Chris-
Are you using the parts/settings folder? Please add some example code and we will get you setup.
Thanks,
Kevin
KevinKeymaster@Justin-
I tried the following field below and it works as expected (I just swapped the choices). Can you try it? Also please make sure you don’t have any other __relate_post fields on the form at all.
piklist('field', array( 'type' => 'select' ,'field' => '_' . piklist::$prefix . 'relate_post' ,'label' => __('Mission Trip', 'extreme') ,'choices' => piklist( get_posts(array( 'post_type' => 'post' ,'numberposts' => -1 ,'orderby' => 'title' ,'order' => 'ASC' )) ,array('ID', 'post_title') ) ,'relate' => array( 'scope' => 'post' ) ));
KevinKeymasterHi Guys-
Sorry I just read this one again, for future reference its very easy to write some code for piklist to handle this. Check out the render_field method in includes/class-piklist-form.php. The following hooks for pre render of a field would allow you to convert a datetime stored in the system.
/** * piklist_request_field * Filter the request field * * @param array $field * * @since 1.0 */ $field = apply_filters('piklist_request_field', $field); /** * piklist_request_field_$scope_$field * Filter a specific request field * * The dynamic portions of the hook name, <code>$field['scope']</code> and <code>$field['field']</code>, * refer to the 'scope' and 'field' parameters, of an individual field. * * @param array $field * * @since 1.0 */ $field = apply_filters('piklist_request_field_' . $field['scope'] . '_' . $field['field'], $field);And the save hooks would allow you to format it back to a datetime after the save method.
/** * piklist_save_field * Fires after fields have been saved * * @param $type Field type. * * @since 1.0 */ do_action('piklist_save_field', $scope, $fields); /** * piklist_save_field-{$scope} * Fires after fields have been saved and is scope specific * * @param $type Field type. * * @since 1.0 */ do_action("piklist_save_field-{$scope}", $fields);Let me know if you guys have any questions.
Thanks,
Kevin
KevinKeymaster@justin-
Grab v0.9.9.4 and check out the demo-common-profile.php and the demo-header.php files. We built in the functionality you have into a comment block parameter:
Default Form: true/false
This will allow you to show the default form for that admin page on that tab.
Thanks,
Kevin
-
AuthorPosts