0

If Safari does not support the require attribute for inputs, how can I require a few specific inputs in my form? Currently, I am using this code in my PHP file triggered by the form to require all fields:

$req = '1';

that works effectively for requiring them all but I only want some of them to be required as opposed to all of them. What are my options assuming I'm not going to use the "require" attribute?

WebWilliam
  • 37
  • 4
  • I'm unclear on what your problem is. Safaris is a web browser, and it doesn't run PHP code at all. – samlev Dec 02 '15 at 16:56
  • whether the solution is PHP, HTML, or JS, I i don't mind, I just want to know how to require specific inputs on my website's form. My current solution is using PHP. – WebWilliam Dec 02 '15 at 16:59
  • You need to provide more code. `$req = '1';` does nothing at all by itself. – Jason Dec 02 '15 at 17:05
  • @Jay Blanchard: That question that you linked looks like it has some really good solutions. Thanks! – WebWilliam Dec 02 '15 at 17:22

0 Answers0