- This topic has 7 replies, 3 voices, and was last updated 6 years ago by
Jason.
-
AuthorPosts
-
-
February 5, 2016 at 1:02 am #5847
jivedigMemberStill moving along with 0.9.9.7 beta, it rocks.
I have a metabox with a group field that includes a file field. I’m using a custom scope for the group and all the fields. Debugging the $fields values when testing all works well as long as the file upload field uses the Media Uploader. If basic: false, that field does not show any value at all during debugging. Very strange.
Is this a bug, or a limitation in the basic uploader inside WP?
Here’s the whole group:
piklist('field', array( 'type' => 'group', 'scope' => 'connect_resource_to_lesson', 'field' => 'add_resource', 'template' => 'theme', 'add_more' => true, 'label' => __('Add New Resources', 'wampum'), 'description' => __('Add resources now, or you can always attach resources later.', 'wampum'), 'fields' => array( array( 'type' => 'text', 'scope' => 'connect_resource_to_lesson', 'field' => 'post_title', 'label' => __('Title', 'wampum'), 'columns' => '12', ), array( 'type' => 'editor', 'scope' => 'connect_resource_to_lesson', 'field' => 'post_content', 'label' => __('Content', 'wampum'), 'columns' => '12', ), array( 'type' => 'file', 'scope' => 'connect_resource_to_lesson', 'field' => 'resource_file', 'label' => __('Upload File', 'wampum'), 'options' => array( 'basic' => true, ), ), ), ));And here is my filter:
add_action( 'piklist_save_field-connect_resource_to_lesson', 'jivedig_debut_this_scope', 10, 1 ); function jivedig_debut_this_scope($fields) { // My debugger from DesktopServer trace($fields); } -
February 5, 2016 at 1:54 pm #5852
-
February 5, 2016 at 3:17 pm #5858
jivedigMemberWait, they’re not supported?
I was just using it as a callback to process the field data myself. Is that scary? I’m building a big plugin now on top of Piklist. I need to manually process the data from the fields and save to the db in my own way. I don’t want some of the fields to save anything, just allow me to grab the values via piklist_save_field. Is there another way to do this?
Hopefully I’m just missing something. Custom scope/processing was one of the big things I liked about Piklist. Can you clear this up for me?
FWIW, I was chatting with Jason Adams via email and he was the one that recommended using a custom scope to accomplish this. I just assumed it was a thing after that.
-
February 5, 2016 at 4:22 pm #5859
-
February 5, 2016 at 4:29 pm #5860
-
February 5, 2016 at 4:33 pm #5861
-
February 5, 2016 at 4:39 pm #5862
-
February 5, 2016 at 4:43 pm #5863
-
-
AuthorPosts
- You must be logged in to reply to this topic.