title: SharePoint 2010 Change Require Field
body: <p>I've added the following code to a SharePoint page - code finds the requested <strong>select</strong> based on <strong>title</strong> and alerts when "<strong>Decision</strong>" <strong>value</strong> is selected. </p>
  
  <p>Looking to remove the alert and replace with code which finds a specific <strong>select</strong> (title$=test) and changes it to mandatory/required.</p>
  
  <p>How do you so with SP2010?</p>
  
  <pre><code>&lt;script type="text/javascript" src="/Deploy/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" src="/Deploy/jquery.SPServices-0.7.1a.min.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
  $(document).ready(function() {
      $("select[title$='Based on']").change(function() {
          var text = $("select[title$='Based on'] :selected").text();
          if (text == "Decision") {
              alert('you must provide reason for suspending this order');
          }
       });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Thanks!</p>