title: how to get the substring in yii
body: <pre><code>    &lt;tr style="display:none"&gt;       
    &lt;td&gt;&lt;?php echo $form-&gt;labelEx($model,'classcode'); ?&gt;&lt;/td&gt;
          &lt;td&gt;    
              &lt;?php echo $form-&gt;textField($model,'classcode',array('size'=&gt;60,'maxlength'=&gt;100,'id'=&gt;'new-base-ref-si-classification-classcode','disabled'=&gt;'')); ?&gt;
              &lt;?php echo $form-&gt;error($model,'classcode'); ?&gt;
  
          &lt;/td&gt;
      &lt;/tr&gt;   
      &lt;tr&gt;
          &lt;td&gt;&lt;?php echo $form-&gt;labelEx($model,'Classification'); ?&gt;&lt;/td&gt;
          &lt;td&gt;    
              &lt;?php echo $form-&gt;textField($model,'Classification',array('size'=&gt;60,'maxlength'=&gt;100,'id'=&gt;'new-base-ref-si-classification-Classification','disabled'=&gt;'')); ?&gt;
              &lt;?php echo $form-&gt;error($model,'Classification'); ?&gt;
          &lt;/td&gt;
      &lt;/tr&gt;   
  </code></pre>
  
  <p>i am having a hard time figuring out what to do please help me .. what i need to is the classcode is hidden .. when i enter a a string it a code will get the first letter and then it will be entered on the classcode before hitting the submit button
  <p>
  for example
  i entered Office supplies on the classification textfield
  the code will get O and S then it will be entered on classcode texfield before submittion</p>