Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

Denis Zhidkov
Denis Zhidkov
2,660 Points

Why does the required fields doesn't work on mobile?

Why does the required fields doesn't work on mobile and when i am pressing button the form is trying to be send?

web-page: http://vote.hooters.com.ru/index.html#bottom

1 Answer

The bubble that prevents you to send the form does not come from your code, but from Chrome (or your browser), which does that when a 'required' attribute is present in the <input> tag. As desktop browser are usually more advanced than mobile ones, it's normal you don't see the message on your phone, althought the form may not de sent.

If you want to display something always, you should use JavaScript or any other programming language.