How should I proceed with logic?
There is a data record form on the page, namely:
- Name
- Surname
- Age
- Mobile
I need to leave these fields as follows:
1- When the page loads the Last name , Age and Cell phone fields should be disabled
2 Click and fill in the next field below should be enabled
3- And so on, for others, being successively
Finally, when all fields are filled in, the submit
button will appear.
NOTE - When the form receives the
submit
event, all fields [name, last name, age and cell phone] become inaccessible.
To have an introductory idea
function Inibe() {
document.formulario.T1.disabled = true;
}
function Exibe() {
document.formulario.T1.disabled = false;
}
<form name="formulario">
<p align="center">
<input type="text" name="T1" size="20" onload="Inibe()"></p>
<p align="center">
</p>
<p align="center">
</p>
<p align="center">
<input type="radio" name="a" onClick="Exibe()" value="1">Habilita</p>
<p align="center">
<input type="radio" name="a" onClick="Inibe()" value="2" checked>Desabilita</p>
<p align="center">
</p>
</form>