Tagged: , ,

Viewing 3 reply threads
  • Author
    Posts
    • #6524
      Sander Schat
      Member

      hi!
      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?

    • #6531
      Jason
      Keymaster

      If 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! 🙂

    • #6543
      Sander Schat
      Member

      yes! 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'
      	)
      ));
    • #6544
      Steve
      Keymaster

      Glad it worked!

      Also, guessing you can remove:

      ,'on_post_status' => array(
        'value' => 'lock'
      )
Viewing 3 reply threads
  • The topic ‘inline html’ is closed to new replies.