Viewing 4 reply threads
  • Author
    Posts
    • #6435

      Hullo there, I’m in situation where I would want to use an editor field but put a condition on it like the rest so that it displays only when another field value is equal to the one specified; just like the normal conditionals. However, I’ve noticed that when I add a condition parameter to the editor field, it stops working and won’t show up in the metabox. Is there a way to do this or it’s just not possible with Piklist? Thanks.

    • #6449
      Steve
      Keymaster

      @semwangajoshua– are you using v0.9.9.8? It’s the latest beta and supports editors in conditions. You can get it here.

    • #7418

      Hey. Currently using v0.9.9.9 and trying to do a simple conditional with the field being hidden as an editor, but it refuses to hide/show.

      Can you confirm if this is possible in the latest version?

    • #7419
      Steve
      Keymaster

      I just changed a text field in the Demos Conditional tab to an Editor and it worked. Try copying some of that code.

    • #7424

      That’s essentially what I did, I’ve posted my code below.

      piklist('field', array(
          'type' => 'radio'
          ,'field' => 'news_sidebar_conditional'
          ,'label' => __('Does this news item have a sidebar?', 'piklist-demo')
          ,'choices' => array(
            'show' => 'Yes'
            ,'hide' => 'No'
          )
          ,'value' => 'hide'
        ));
      
      piklist('field', array(
          'type' => 'editor'
          ,'field' => 'news_sidebar'
          ,'scope' => 'post_meta'
          ,'template' => 'field'
          ,'options' => array (
            'wpautop' => true
            ,'media_buttons' => true
            ,'tabindex' => ''
            ,'editor_css' => ''
            ,'editor_class' => ''
            ,'teeny' => false
            ,'dfw' => false
            ,'tinymce' => true
            ,'quicktags' => true
            ,'drag_drop_upload' => true
          )
          ,'on_post_status' => array(
            'value' => 'lock'
          )
          ,'conditions' => array(
            array(
              'field' => 'news_sidebar_conditional'
              ,'value' => 'show'
            )
          )
        ));
Viewing 4 reply threads
  • You must be logged in to reply to this topic.