最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

forms - How to add required fields in user profile admin page?

programmeradmin1浏览0评论

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
发布评论

评论列表(0)

  1. 暂无评论