[Plugin: Posts 2 Posts] fields API with select box
-
Hi,
First, I really love your plugin – thanks you very much for your efforts to the community !
I have a quick question…
Would it be possible to enhanced ‘fields’ API to insert a select box instead of the input text ? Something like that…register_connection_type( array( 'from' => 'post', 'to' => 'page', 'fields' => array( 'foo' => array( 'title' => 'Foo', 'type' => 'select' ), 'bar' => array( 'title' => 'Bar', 'type' => 'date', 'default' => 'current date' ) ) ) );OR…
Would it be possible to enhanced ‘fields’ API to populate a field with a custom taxonomy to create a select box instead of the input text ? Something like that…For example using your movie/actor demo…
Let’s say we had a taxonomy type called ‘roles’: leading actor, cameo, etc.p2p_register_connection_type( array( 'from' => 'actor', 'to' => 'movie', 'fields' => array( 'role' => array( 'title' => 'Role', 'type' => 'select' 'values' => 'array('taxonomy roles'); ), 'date' => array( 'title' => 'Date', 'type' => 'date', 'default' => 'current date' ) ) ) );Would this be possible ?
Thanks you very much again !
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘[Plugin: Posts 2 Posts] fields API with select box’ is closed to new replies.