Support › General › Select_tree with attribute required true not works
When I apply the attribute required true in select_tree field_type, the post is not saved (action save is not fired when I click on button publish/update).
'id' => 'category-and-types',
'type' => 'taxonomy',
'name' => esc_html__( 'Categoria, Tipo e Subtipo', 'webpesados' ),
'placeholder' => esc_html__( 'Selecione', 'webpesados' ),
'taxonomy' => 'category',
'field_type' => 'select_tree',
'class' => 'web_select_tree',
'columns' => 6,
'attributes' => array(
'required' => false,
Does the code work when you remove that attribute completely? Setting it false actually doesn't do anything.
Without the parameter attributes -> required, the code works, but I need that this field be required. Can you help me?
Your code might be incomplete. You're missing the closing bracket on the attributes array
The code that I paste in ticket really have a unclosed tag. Was a mistake when I try to format the code here after to paste. But in my project, the all bracket are closed and the post is not saved.