Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Custom Taxonomy with Optgroup #7540
    buishi
    Member

    I know this is old, but this is how I did it:

    $parents = get_terms(array(
      'taxonomy' => 'case_category'
      ,'hide_empty' => false
      ,'parent' => 0
      ));
    
      function choices($parent_cats){
        $cats = [];
        foreach ($parent_cats as $parent) {
          $cats[$parent->name] = piklist(
          get_terms('case_category', array(
            'hide_empty' => false
            ,'child_of' =>$parent->term_id
          )), array(
            'term_id','name'
          ));
        }
        return $cats;
      }
      // var_dump(choices($parents));
    
        piklist('field', array(
          'type' => 'select',
          'scope' => 'taxonomy',
          'field' => 'case_category',
          'label' => 'Category',
          'attributes' => array(
            'class' => 'form-control'
          ),
          'choices' => choices($parents),
        'required' => true,
        ));
    
    in reply to: Widget title bug #7539
    buishi
    Member

    Yep, same issue on 0.9.9.9

    in reply to: Front End Form Taxonomy Not Saving #7507
    buishi
    Member

    I’m also having this problem in 0.9.9.9. Anyone figure out a patch?

    in reply to: Widgets not displaying after Piklist 0.9.4.29 #7505
    buishi
    Member

    Thank you xolotl, I had the same problem and didn’t even know it. I’m on piklist 0.9.9.9

    It would be great if this was fixed, or the documentation updated (or both)
    It says here only the output file is needed: https://piklist.com/learn/doc/widget-output/

Viewing 4 posts - 1 through 4 (of 4 total)