# Debug a Donation Form - 调试捐赠表单

**URL:** <https://forum.freecodecamp.org/t/debug-a-donation-form/789071>\
**Category:** General\
**Tags:** chinese-中文\
**Created:** [May 16, 2026, 5:04pm UTC](https://forum.freecodecamp.org/t/debug-a-donation-form/789071 "2026-05-16T17:04:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Laukkvan](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/laukkvan/32/422190_2.png) [@Laukkvan](https://forum.freecodecamp.org/u/Laukkvan)\
**Post date:** [May 16, 2026, 5:04pm UTC](https://forum.freecodecamp.org/t/debug-a-donation-form/789071/1 "2026-05-16T17:04:17Z")

</div>

### 告诉我们发生了什么：

required要我写在input里面然后我写了他还是提示我没有我也没有拼错字复制也试了。  
Full Name

这就是我写的第一个input部分，它还是提示没有required.

### 到目前为止你的代码

```html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Donation Form</title>
</head>
<body>
  <h1>Donation Form</h1>
  <form>
    <label for="name">Full Name:</label>
    <input type="text" Id="name" required>

    <label for="email">Email Address:</label>
    <input type="email" id="email" required>

    <label for="amount">Donation Amount ($):</label>
    <input type="number" name="amount" required>

    <label for="newsletter">subscribe</label>
    <input type="checkbox" id="newsletter">

    <input type="submit" value="Send">
    
    <button>Sumbit</button>
  </form>
</body>
</html>

```

### 你的浏览器信息：

用户代理是： `Mozilla/5.0 (iPhone; CPU iPhone OS 26_4_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/148.0.7778.166 Mobile/15E148 Safari/604.1`

### 挑战信息：

Debug a Donation Form - 调试捐赠表单

> **[freeCodeCamp.org](https://www.freecodecamp.org/chinese/learn/responsive-web-design-v9/lab-debug-donation-form/debug-donation-form)**
>
> 免费学习编程

GitHub Link: [i18n-curriculum/curriculum/challenges/chinese/blocks/lab-debug-donation-form/690ddb5e6ee94eb73ed172b0.md at main · freeCodeCamp/i18n-curriculum · GitHub](https://github.com/freeCodeCamp/i18n-curriculum/blob/main/curriculum/challenges/chinese/blocks/lab-debug-donation-form/690ddb5e6ee94eb73ed172b0.md)

---

<div class="post-metadata">

**Author:** ![dhess](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dhess/32/406235_2.png) [@dhess](https://forum.freecodecamp.org/u/dhess)\
**Post date:** [May 16, 2026, 6:33pm UTC](https://forum.freecodecamp.org/t/debug-a-donation-form/789071/2 "2026-05-16T18:33:06Z")

</div>

Hi there,

It looks like you have removed the` name` attributes from the starting code. This will cause the tests to fail.

You also have no` id` attribute for the amount input, yet you are referencing it in that label.

> [@Laukkvan](#):
>
> `<button>Sumbit</button>`

And why was this added?

Happy coding!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [June 13, 2026, 6:33pm UTC](https://forum.freecodecamp.org/t/debug-a-donation-form/789071/3 "2026-06-13T18:33:47Z")

</div>

Closed on June 13, 2026, 6:33pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
