How to create an input form (user fills in blank)

I am trying to create a text box that the end user fills in. (Fill in the blank quiz)

At first, I was successful using this code: (had to remove the div brackets so code would display

div contenteditable=“true” style=“color: #003399; font-family: Courier; font-weight: normal; font-size: 20px; size=” 20"="" maxlength=“50”>div

but when I copied it into another hype file and inserted the hype html widget into an ibook, the “blank” could not be filled in from the iBook viewed on a computer.

Does anyone know why the code would work in one ibook and not another? Or have a solution on how to code a “fill-in-the-blank” quiz?

Thanks!
Jace

Did you try something like this:

<input type="text" id="mytextinputfield" size="30">
1 Like

Thank you Drew!
The code I ended up with that works:

form

input type=“text” ;

input style=“font-size: 20px; border-style: none; background-color: lightyellow; color: black; padding: 5px; size=“30”;” value="" id=“answer1”

/form

1 Like

Hi @Jace5,

By the way if you use the symbol above the reply text box or indent your text by 4 spaces then you can write code and it will display like this

<form>

<input type="text">

<input style="font-size: 20px; border-style: none; background-color: lightyellow; color: black; padding: 5px; size="30";" value="" id="answer1">

</form>

that way you can include code you want and you don’t have to omit the braces :wink:

Also <form></form> written as in line with your text will also work.

Just in case you wanted to know :wink:

D

3 Likes

Thank you DBear! Yes, that is good to know! :wink: