And onsubmit of the form I would like to get the value of what boxes were checked.
render() {
const { status } = this.state;
function itworked() {
alert("Sky will contact you shortly!")
var checkedValue = document.getElementsByClassName('.checkbox').value
console.log(checkedValue)
}
But for some reason this method is giving me undefined when it is submitted.
Can anyone catch where I went wrong?
Thank you.
An array would be fine, so long as it is an array of the values of the boxes.
If you know of another method to get these values, in any form. I would be very appreciative.
Thats a good idea with making them into a component.