question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

form demo element id not unique

See original GitHub issue

https://ant.design/components/form-cn

2018-04-24 12 27 19
[DOM] Found 2 elements with non-unique id #error: (More info: https://goo.gl/9p2vKq) <input type=​"text" placeholder=​"unavailable choice" id=​"error" class=​"ant-input">​…​</input>​#shadow-root (user-agent)</input>​ <input type=​"text" placeholder=​"unavailable choice" id=​"error" class=​"ant-input">​…​</input>​
/components/form-cn/#header:1 [DOM] Found 2 elements with non-unique id #nickname: (More info: https://goo.gl/9p2vKq) <input type=​"text" value id=​"nickname" data-__meta=​"[object Object]​" data-__field=​"[object Object]​" class=​"ant-input">​…​</input>​ <input type=​"text" placeholder=​"Please input your nickname" value id=​"nickname" data-__meta=​"[object Object]​" data-__field=​"[object Object]​" class=​"ant-input">​…​</input>​
/components/form-cn/#header:1 [DOM] Found 3 elements with non-unique id #password: (More info: https://goo.gl/9p2vKq) <input type=​"password" placeholder=​"Password" value id=​"password" data-__meta=​"[object Object]​" data-__field=​"[object Object]​" class=​"ant-input">​…​</input>​ <input type=​"password" placeholder=​"Password" value id=​"password" data-__meta=​"[object Object]​" data-__field=​"[object Object]​" class=​"ant-input">​…​</input>​ <input type=​"password" value id=​"password" data-__meta=​"[object Object]​" data-__field=​"[object Object]​" class=​"ant-input">​…​</input>​
/components/form-cn/#header:1 [DOM] Found 2 elements with non-unique id #userName: (More info: https://goo.gl/9p2vKq) <input type=​"text" placeholder=​"Username" value id=​"userName" data-__meta=​"[object Object]​" data-__field=​"[object Object]​" class=​"ant-input">​…​</input>​ <input type=​"text" placeholder=​"Username" value id=​"userName" data-__meta=​"[object Object]​" data-__field=​"[object Object]​" class=​"ant-input">​…​</input>​
/components/form-cn/#header:1 [DOM] Found 2 elements with non-unique id #username: (More info: https://goo.gl/9p2vKq) <input type=​"text" value=​"benjycui" id=​"username" data-__meta=​"[object Object]​" data-__field=​"[object Object]​" class=​"ant-input">​…​</input>​ <input type=​"text" placeholder=​"Please input your name" value id=​"username" data-__meta=​"[object Object]​" data-__field=​"[object Object]​" class=​"ant-input">​…​</input>​
/components/form-cn/#header:1 [DOM] Found 2 elements with non-unique id #warning: (More info: https://goo.gl/9p2vKq) 

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

14reactions
afc163commented, Jun 16, 2020

@zhutiancheng2 给 Form 加个 name 就行了。https://github.com/react-component/form/pull/197

Please add name to different Form:

<Form name="form1" />
<Form name="form2" />
10reactions
crazyaircommented, May 15, 2018

+1

Read more comments on GitHub >

github_iconTop Results From Across the Web

13. Element ID is not unique | Accessibility at UH
Context: Any properties used to assist in navigation (ID's, access keys, tab orders, etc) must be unique for readers to navigate through the ......
Read more >
Element ID is not unique | WordPress.org
I have created 2 different email subscriber forms with different id. When I insert the 2 forms into the same page using shortcodes...
Read more >
Siteimprove - How to fix "Element IDs are not unique"
Usually, these IDs are not necessary as part of your Drupal content. Removing the IDs fixes the issue. Login to your Drupal site....
Read more >
When Working with Element IDs, Make Them Unique
Under accessibility checks, you may have an issue labeled "Element IDs are not unique" highlighted on your website.
Read more >
Does ID have to be unique in the whole page? - Stack Overflow
The id attribute specifies its element's unique identifier (ID). The value must be unique amongst all the IDs in the element's home subtree...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found