状況を説明しましょう:
labelのfor部分にreputationを入力するとlocationを入力するよう指示される。逆にlocationを入力するとreputationを入力するよう求められる。
inputの値にも指示ではreputationとあるが実際はlocationの入力を求められる。
When you enter reputation in the for section of the label, you are instructed to enter location. Conversely, when you enter location, you are asked to enter reputation.
Although the instructions say reputation in the input value, you are actually asked to enter location.
現状のコード
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Hotel Feedback Form</title>
</head>
<body>
<header>
<h1>Hotel Feedback Form</h1>
<p>
Thank you for staying with us. Please provide feedback on your recent
stay.
</p>
</header>
<main>
<form method="POST" action="https://hotel-feedback.freecodecamp.org">
<fieldset>
<legend>Personal Information</legend>
<label for="full-name">Name (required):</label>
<input type="text" id="full-name" name="name" placeholder="Ex. John Doe" required size="20">
<label for="email">Email address (required):</label>
<input
placeholder="example@email.com"
required
id="email"
type="email"
name="email"
size="20"
/>
<label for="age">Age (optional):</label>
<input type="number" name="age" id="age" min="3" max="100" />
</fieldset>
<fieldset>
<legend>Was this your first time at our hotel?</legend>
<label for="yes-option">Yes</label>
<input id="yes-option" type="radio" name="hotel-stay" />
<label for="no-option">No</label>
<input id="no-option" type="radio" name="hotel-stay" />
</fieldset>
<fieldset>
<legend>
Why did you choose to stay at our hotel? (Check all that apply)
</legend>
<label for="ads">Social Media Ads</label>
<input type="checkbox" id="ads" name="ads" value="ads" />
<label for="recommendation">Personal Recommendation</label>
<input
type="checkbox"
id="recommendation"
name="recommendation"
value="recommendation"
/>
<!-- User Editable Region -->
<label for="location">Location</label>
<input
type="checkbox"
id="location"
name="location"
value="location"
/>
<!-- User Editable Region -->
</fieldset>
</form>
</main>
</body>
</html>
ブラウザ情報:
ユーザーエージェント: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
チャレンジの情報:
Build a Hotel Feedback Form - Step 24