You already know how to make a page count something when a visitor uses a button.
Today your page will ask a visitor something. They type an answer, press a button, and their words join a list on the page.
By the end you will have a text box, a list box and a button that joins the two together.
A web page can do more than show words. It can ask a visitor to type something.
Three Apps pieces work together:
Inside that button sits one small action block: add text box to list box. That action is the glue.
You will build the pieces in that order: text box first, then list box, then the button and its action.
Open your site in the interactive. Go to the page where a visitor should type something.
Use your second page, or any page where a visitor should type. If you still have a page called Ideas, use that.
From Apps, drag a text box block onto that page.
Select the text box block.
Set its name to hobby.
Set its placeholder to Type a hobby idea.
The placeholder is the pale writing a visitor sees before they type. It tells them what to write.
Open the Your web page tab.
Find the text box on your page. You should see the pale placeholder writing inside it.
Select inside the text box and type a word, just to try it.
The word sits there. It does not join a list yet. That is fine. The list and the button come next.
Clear the word again so the box is ready.
Go back to the Blocks tab.
From Apps, drag a list box block onto the same page as your text box.
Use list box from Apps, not the ordinary list block.
Snap it under the text box so the list will show below where people type.
Select the list box block.
Set its name to list.
Open the Your web page tab. You should see an empty list waiting under the text box.
You're previewing this lesson. Get full access to this lesson and hundreds more — each one ready to teach, with interactive activities, printable resources and pupil progress tracking built in.