title: how to enable/disable a submit button, only if two conditions are provided: checking input radio and filling input text
body: <p>I have this form: </p>
  
  <pre><code>&lt;form name="myform" method="post"&gt;
    &lt;input class="class_x" type="radio" name="name_1" value="value_1" id="id_1"/&gt;&lt;br/&gt;
    &lt;input class="class_x" type="radio" name="name_2" value="value_2" id="id_2"/&gt;&lt;br/&gt;
    &lt;input class="class_x" type="radio" name="name_3" value="value_3" id="id_3"/&gt;&lt;br/&gt;
    &lt;input onkeyup="checkFormsValidity();" id="input_id" type="text" name="input_name" value="" required/&gt;&lt;br/&gt;
    &lt;input type="submit" name="submit_name" value="OK" class="submit_class" id="SubmitButton"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>three input radios, one input text, and one input submit button.</p>
  
  <p>According to the javascript code: </p>
  
  <pre><code>//ENABLE OR DISABLE SUBMIT BUTTON CODE ACCORDING TO INPUT RADIO
  function checkIfValid() {
  var current = $('input.class_x').filter(':checked');
  
    if (current.length &gt; 1) {
      sbmtBtn.disabled = false;
    } else {
      sbmtBtn.disabled = true;
    }
  };
  
  //ENABLE OR DISABLE SUBMIT BUTTON CODE ACCORDING TO INPUT TEXT
  checkFormsValidity = function(){
  var myforms = document.forms["myform"];   
      if (myforms.checkValidity()) {
          sbmtBtn.disabled = false;
      } else {
          sbmtBtn.disabled = true;
      }
  }
  </code></pre>
  
  <p>if any of these two conditions are provided the input submit button will be enabled.
  BUT what I need is that the input <strong>submit button ONLY enables if BOTH conditions are provided</strong>. AND if <strong>ANY of these conditions are changed back</strong> THEN the submit button should disable back again.</p>
  
  <p>I know this needs a <strong>very strict</strong> syntax.</p>
  
  <p>According to the code I am providing, what changes need to be done in order to achieve this? 
  Here is the JSFIDDLE <a href="https://jsfiddle.net/Suiberu/1n5gbooq/" rel="nofollow noreferrer">https://jsfiddle.net/Suiberu/1n5gbooq/</a></p>
  
  <p>thanks!</p>