- This topic has 3 replies, 3 voices, and was last updated 5 years, 8 months ago by
Steve.
Viewing 3 reply threads
-
AuthorPosts
-
-
May 20, 2016 at 1:00 pm #6524
Sander SchatMemberhi!
is it possible to have the “html” field behind (inline) of another field (text)?
i want to show a button, behind a text or select field…Maybe in another way to do so?
-
May 20, 2016 at 5:26 pm #6531
JasonKeymasterIf you check out the Piklist Demos (go to Piklist>Add Ons and activate the demos), create a new demo post type, and go to the radios, you’ll see an example of embedding a field (i.e. text field) within a radio field. Check out the code to see how it’s done. I believe this will give you a way of doing what you’re intending.
Hope this helps! 🙂
-
May 23, 2016 at 10:17 am #6543
Sander SchatMemberyes! thanks!!
this is a quick copy paste and seems to work:
piklist('field', array( 'type' => 'group' ,'label' => __('Address (Un-Grouped)', 'piklist-demo') ,'description' => __('An Un-grouped field. Data is saved as individual meta and is searchable.', 'piklist-demo') ,'fields' => array( array( 'type' => 'text' ,'field' => 'ungrouped_city' ,'label' => __('City', 'piklist-demo') ,'columns' => 6 ) ,array( 'type' => 'html' ,'label' => __('Opleiding', 'piklist-demo') ,'value' => "<button>X</button>" ) ) ,'on_post_status' => array( 'value' => 'lock' ) )); -
May 23, 2016 at 10:27 am #6544
SteveKeymasterGlad it worked!
Also, guessing you can remove:
,'on_post_status' => array( 'value' => 'lock' )
-
-
AuthorPosts
Viewing 3 reply threads
- The topic ‘inline html’ is closed to new replies.