Viewing 2 reply threads
  • Author
    Posts
    • #5870
      rafi
      Member

      Question related to conditionals:
      When selecting more than one item on a multi-select box, Only the first selected item will trigger.
      The rest are ignored. On the example below if you select on the multiple select field: ‘prefecture’
      ‘Aichi’ the hidden field aichi_city will show. Selecting an additional item will not show any other field.
      Is there a way to show other fields by selecting the respective items on the field: ‘prefecture’?

      piklist(‘field’, array(
      ‘type’ => ‘select’
      ,’scope’ => ‘user_meta’
      ,’field’ => ‘prefecture’
      ,’label’ => ‘Prefecture’
      ,’attributes’ => array(
      ‘class’ => ‘text’
      , ‘multiple’ => ‘multiple’
      )
      ,’choices’ => array(
      Aichi’ => ‘Aichi’
      ,’Akita’ => ‘Akita’
      ,’Aomori’ => ‘Aomori’
      ,’Chiba’ => ‘Chiba’
      ,’Ehime’ => ‘Ehime’
      )));

      piklist(‘field’, array(
      ‘type’ => ‘text’
      ,’scope’ => ‘user_meta’
      ,’field’ => ‘aichi_city’
      ,’label’ => ‘Aichi city’
      ,’conditions’ => array(
      array(
      ‘field’ => ‘prefecture’
      ,’value’ => ‘Aichi’
      )
      )
      ));

      piklist(‘field’, array(
      ‘type’ => ‘text’
      ,’scope’ => ‘user_meta’
      ,’field’ => ‘aichi_city’
      ,’label’ => ‘Aichi city’
      ,’conditions’ => array(
      array(
      ‘field’ => ‘prefecture’
      ,’value’ => ‘Aichi’
      )
      )
      ));

      piklist(‘field’, array(
      ‘type’ => ‘text’
      ,’scope’ => ‘user_meta’
      ,’field’ => ‘akita_city’
      ,’label’ => ‘Akita city’
      ,’conditions’ => array(
      array(
      ‘field’ => ‘prefecture’
      ,’value’ => ‘Aichi’
      )
      )
      ));

      piklist(‘field’, array(
      ‘type’ => ‘text’
      ,’scope’ => ‘user_meta’
      ,’field’ => ‘aomori_city’
      ,’label’ => ‘Aomori city’
      ,’conditions’ => array(
      array(
      ‘field’ => ‘prefecture’
      ,’value’ => ‘Aomori’
      )
      )
      ));

    • #5876
      Steve
      Keymaster
      This reply has been marked as private.
    • #5877
      Steve
      Keymaster

      @rafi– There seems to be a bug with multi-selects and conditionals. You may have to change to checkboxes.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.