JSFiddle - React, Tailwind, and code Playground

by Kyle

HTML

<input id="company" name="companyname" value="company">
<input type="submit" class="button">

JavaScript

$(".button").click(function(e){
    if($("#company").attr('value', 'defaultValue'))
       {
           alert("Please fill out the contact form."); 
           e.preventDefault();
       }
   });