Taxonomy advanced and required option

Support General Taxonomy advanced and required option

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15109
    Camilo MejiaCamilo Mejia
    Participant

    I have a field defined this way:

    
    array(
      'type'       => 'taxonomy_advanced',
      'field_type' => 'select_tree',
      'required'   => true,
    ),
    

    And I have a tree like this:

    • Item level 1
      • Item level 2
      • Item level 2
        • Item level 3
        • Item level 3

    The problem is that with required equal true, the user can only choose one item of level 3. What I need is that the user can choose any item in the hierarchy. Without setting the field as required, the user can select any option, but I need to force the user to choose one.

    #15124
    Anh TranAnh Tran
    Keymaster

    I'd suggest not using required with select_tree as the logic is confusing. The required attribute will be applied to all select, no matter where it is and which level it has.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.