Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

checkbox harlowe

How do I make checkboxes in harlowe? Constantly getting unexpected identifier. I want to ask a question where user inputs multiple checkboxes. I want to store them in memory to so should I be using an array of variables?

Thanks.

Comments

  • Showing checkboxes is simple:
    <form action="">
    <input type="checkbox" name="vehicle" value="Bike">I have a bike
    <input type="checkbox" name="vehicle" value="Car">I have a car 
    </form>
    

    You can even use the onchange event to call some javascript like so:
    <input type="checkbox" name="vehicle" value="Bike"
    	onchange="console.log(this.value + ' was clicked');">I have a bike
    

    The issue is that I don't know of a simple way to access Harlowe variables using javascript, though @csalzman worked out this hack.
Sign In or Register to comment.