Java script validating form
The illustration below shows this relationship: Note that the 'I' in selected Index needs to be capitalised - Java Script functions and variables are always case-sensitive. Read more about the humble checkbox in our HTML5 Checkbox Validation article.
Before we dive into the meat of the tutorial, I want to talk a little about blockchain.
A lot of hype surrounds blockchain, but it's well deserved.
Radio buttons are implemented as if they were an array of checkboxes.
To find out which value (if any) has been selected, you need to loop through the array until you find which one has been selected: In the case of a single radio button we have nothing to loop through so just return either it's value, if the radio button is checked, or false.
I've coded a working form, all checks are great but for some reason the hardest part is trying to stop form submission before validation.