I am trying to code a fake reCAPTCHA box for a school project. I have the code finished but I want to make it so you can first submit your answer from the input elements above after having checkboxed the reCAPTCHA element. From my research I can tell I need javascript, but I’ve never learned to code that before now, so I am in desperate need of help.
The input element
<form action="/action_page.php">
<label for="fname">First name:</label>
<input type="text" id="fname" name="fname"><br><br>
<label for="lname">Last name:</label>
<input type="text" id="lname" name="lname"><br><br>
</form>
<section>
<label for="check">
<div class="input-container">
<input type="checkbox" class="checkbox" id="check">
<span class="checkbox-text">I'm not a robot</span>
</div>
</label>
<img src="captcha.png" alt="" class="capcap">
<span class="recaptcha">reCAPTCHA</span>
<br>
<a href="#" class="hi">Privacy</a>
<span class="dash">-</span>
<a href="#" class="hi">Terms</a>
</section>
<p>Please check of the box to verify you're not a robot.</p>
<script>
if (checkbox is checked) {
input type="submit" value="Submit"
}
</script>
I tried my hand at coding the javascript, but honestly the toturial I looked at wasn’t quite helpful, and let me very puzzled.
2
Answers
Try This:
Please Refer to the following playlist
https://youtube.com/playlist?list=PLg9mj9NR7Z6a6py4Cps_odGcrwhP3O7D7&si=PjTxE0jbJHnRD0Mm