Tagged: callback, feature, request, validation
- This topic has 0 replies, 1 voice, and was last updated 8 years, 3 months ago by
Marcus.
-
AuthorPosts
-
-
October 25, 2013 at 9:00 am #1192
MarcusMemberAfter using Piklist for awhile, I have a really important request…
It would be nice to have callbacks for not only the javascript side (so a callback for different states) such as:
'jscallback' => array ( 'function' => 'javascript_function_name_here' ,'state' => 'onchange' ,'args' => array ( $post->ID ,'postid' ,'taxonomy' ) )But also for php and when it updates, such as:
'phpcallback' => array ( 'function' => 'php_function_name_here', ,'state' => 'update' // others could be 'load', 'init', etc. ,'args' => array ( $post->ID ,'postid' ,'taxonomy' ) )Just a thought. It would be nice if it had its own validation for every type of field, but thats a massive undertaking. I created a small micro-api for jQuery a while back that covers every type of entry, phone (us/international), credit cards, dates, passwords, etc. Maybe I’ll look into creating it as a plugin to piklist.
But this suggestion above, only helps me fine tune the granularity of working with a piklist meta box.
Giving us ultimate control on how we want our metabox to work.This could of course all be ignored and use a simple action or filter hook as a parameter in the fields, (such as choosing the action hook or filter hook that you’ve created within piklist, and then give them the option of putting their own function name) but I’ll leave this to your brains.
Marcus
-
-
AuthorPosts
- You must be logged in to reply to this topic.