Custom HTML input fields validate with message

Confluence User - 10 Dec, 2022

Dear All,


i have create new from where we are completely using the Custom HTML page for user to enter the value, but we want text field to be validate when they click on the submit button or click on complete button 


here is the below html code i using for this project kindly guide me how can we archive this using joget elements for checking mandatory and inform the user that they are missing this fields for filling. 

<table width="1092" height="280" border="1">
  <tbody>
    <tr bgcolor="#EEECE1">
      <td width="24"> </td>
      <td width="478"> </td>
      <td colspan="3"><strong>STAFF SELF ASSESSMENT</strong></td>
    </tr>
    <tr bgcolor="#EEECE1">
      <td><strong>No.</strong></td>
      <td><strong>SKILLS</strong></td>
      <td width="112"><p align="center"><strong>CANNOT PERFORM</strong></p></td>
      <td width="182"><strong>PERFORMED UNDER  SUPERVISION</strong></td>
      <td width="262"><strong>COMPETENT</strong></td>
    </tr>
    <tr>
      <td colspan="5" bgcolor="#C0C0C0" ><strong>General Competencies </strong></td>
    </tr>
    <tr bgcolor="#C0C0C0">
      <td> </td>
      <td colspan="4"><strong>Professional Conduct</strong></td>
    </tr>
    <tr>
      <td>1</td>
      <td><strong>Maintain professional  knowledge and competence </strong></td>
      <td><input name="cp1" type="text" required="required" class="textfield_21" id="cp1" placeholder="" value="" size="6" maxlength="2"></td>
      <td><input name="pus1" type="text" required="required" class="textfield_21" id="pus1" placeholder="" value="" size="6" maxlength="2"></td>
      <td><input name="c1" type="text" required="required" class="textfield_21" id="c1" placeholder="" value="" size="6" maxlength="2">
      </td>
    </tr>
    <tr>
      <td>2</td>
      <td><strong>Acknowledge limitations,  incompetence and seek advice when needed </strong></td>
      <td><input name="cp2" type="text" required="required" id="cp2" size="6" maxlength="2" /></td>
      <td><input name="pus2" type="text" required="required" id="pus2" size="6" maxlength="2" /></td>
      <td><input name="c" type="text" required="required" id="c2" size="6" maxlength="2" /></td>
    </tr>
    <tr>
      <td>3</td>
      <td><strong>Demonstrate assertiveness  within the team, taking into account the customs, values, and spiritual beliefs  of both patients and colleagues</strong></td>
      <td><input name="cp3" type="text" required="required" id="cp3" size="6" maxlength="2" /></td>
      <td><input name="pus3" type="text" required="required" id="pus3" size="6" maxlength="2" /></td>
      <td><input name="c2" type="text" required="required" id="c3" size="6" maxlength="2" /></td>
    </tr>
  </tbody>
</table>



html

2


13 Dec, 2022
confluenceUser
confluenceUser

You could use add a Default Validator to the relevant field or add Javascript based Front End Validation to your custom HTML page. 

02 Feb, 2023
confluenceUser
confluenceUser

you could try to add javascript using if condition if the field is empty it will alert a message and return false.

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print