DEV Community

Discussion on: freeCodeCamp Project Done #2: A Survey Form

Collapse
 
jithi121 profile image
jithi121

Hey, how do we add pop up "fill this field"?

Collapse
 
babib profile image
𝐁𝐚𝐛𝐢 ✨

Hello.
By adding the 'required' attribute the the given HTML input tag

Check out the code segment from my work
dev-to-uploads.s3.amazonaws.com/up...

Collapse
 
babib profile image
𝐁𝐚𝐛𝐢 ✨

The required attribute is a boolean attribute.
When present, it specifies that an input field must be filled out before submitting the form.

Collapse
 
chaveamin profile image
chaveamin

add "required" attribute to your form input


<input type="name" id="name" required> 

Enter fullscreen mode Exit fullscreen mode