how to make textbox should be mandatory to be filled up

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bhutan123
    New Member
    • Jun 2014
    • 6

    how to make textbox should be mandatory to be filled up

    Code:
    <tr>
    td>Enter Viva Marks (20%):</td>
    <td><input type="text" id="VivaMarks" name="VivaMarks"  maxlength="4" onKeyUp="numericFilter(this);" value=" <?php if(isset($esubjectID)){echo $eViva;} ?>" ></td>
    </tr>
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    that depends a little bit on the used browsers. if the support HTML5 form, you could simply add the required attribute, otherwise you would need to write a JavaScript that checks before submitting that the text field is properly filled (and if not cancels the submit).

    Comment

    Working...