Help getting value out of check box and input box for same field

Hi guys. Have a form for a removal site. What I need is the user to select an item in an check box if they have ie sofa and then to enter how many sofas in an input box. I need to do this with numerous items and then have the results emailed to me. Any ideas how to do this please. Or any tutorials around thanks

The question is, “do you know javascript?”

Not brilliant at it but think I can get around it. Would it be better doing it in Javascript? Only the rest of my form I have developed it in php

Eh? What’s so complicated about it?

<label for="sofas">Sofas</label><input type="checkbox" name="sofas" id="sofas" />
<label for="sofas_qty">Quantity</label><input type="text" name="sofas_qty" id="sofas_qty" />

In terms of UX it’s crap, though.

Well, you draw the form in php but you dont want to keep reloading the page as the user fills out the form!
So I would pull in content via javascript or show/hide fields according to what the user selects, then send the form at the end with php.

You could just test whether or not the input had a value. If it doesn’t, assume “unchecked”, else “checked”

Cheers guys. I have managed to get it done in Javascript, works a treat.