admin管理员组

文章数量:1333185

I managed to add custom fields in the user profile admin page like this.

The problem is when I add required="true" or required="required" on fields, the submit button do action without checking required empty inputs.

The submit is running by Ajax ?

How can I force to make required fields in this admin page ?

I managed to add custom fields in the user profile admin page like this.

The problem is when I add required="true" or required="required" on fields, the submit button do action without checking required empty inputs.

The submit is running by Ajax ?

How can I force to make required fields in this admin page ?

Share Improve this question asked Apr 8, 2020 at 15:52 J.BizMaiJ.BizMai 9002 gold badges10 silver badges30 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

Actually, in profile.php, edit-user.php and new-user.php, you have to :

  1. add form-required class on <tr>, not on the input field
  2. add aria-required="true" on the input field

本文标签: formsHow to add required fields in user profile admin page