Custom Fields
Re-Envisioned
Support General Taxonomy advanced and required option

This topic contains 1 reply, has 2 voices, and was last updated by  Anh Tran 2 months, 3 weeks ago.

  • Creator
    Topic
  • #15109

    Camilo 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.

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #15124

    Anh 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 1 replies (of 1 total)

You must be logged in to reply to this topic.