Viewing 0 reply threads
  • Author
    Posts
    • #1932

      Hello!

      Is there a way to add a own custom field to a metabox?

      Something like this:

       piklist('field', array(
          'type' => 'my_custom_field'
          ,'label' => 'My own custom Field'
          ,'field' => 'myCustomField'
          ,'description' => 'My own html field.'
        ));
      
      add_action( 'piklist_render_my_custom_field', 'my_custom_field_function', 10, 2 );
      function my_custom_field_function( $field, $meta ) {
      	return '<label for="' . $field['id'] . '">' . $field['label'] . '</label><input type="text" id="' . $field['id'] . '" value="' . $meta . '" />';
      }

      This is a simple example, I want to build a field that use a table with pagination, something my customer want and will be great if I can use piklist to do that.

      Thank you.

Viewing 0 reply threads
  • The topic ‘Piklist my own custom field’ is closed to new replies.