Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^2: Organizing Form Input

by Spidy (Chaplain)
on Feb 24, 2007 at 17:43 UTC ( #601898=note: print w/ replies, xml ) Need Help??

in reply to Re: Organizing Form Input
in thread Organizing Form Input

Basically, the users are adding questions to a quiz. They are able to type in the text of the question, one right answer, and as many wrong answers as they want to. Instead of just offering up 62 input boxes for wrong answers and saying "fill out as many as you can", I would rather offer just one and an option to "add another answer".

Replies are listed 'Best First'.
Re^3: Organizing Form Input
by graff (Chancellor) on Feb 24, 2007 at 22:28 UTC
    That doesn't seem so hard, and I could imagine a couple different ways to do this with minimum back-and-forth for non-javascript users -- and no real need for javascript at all, really.

    One way: a specific form/submit button is used to add a question, and there's a type-in to accept the number of possible answers to make available (either including the right answer, or in addition to it), and this defaults to some reasonable value. On submitting this, a second form is given with type-ins for the question itself, and for the requested number of answers.

    Another way: when responding to a request to add a question (no other parameter needed), simply provide three text entry boxes: one for the question, one for the right answer, and a larger (scrollable) one for a list of wrong answers, with instructions on how to mark the boundaries between distinct wrong answers in this box (e.g. use "===" or something like that). So long as you provide a "preview" stage (like PM does), this should work fine.

    In either case, all the components for a new question are submitted at one time; you just need to name and maintain the user/quiz-id and the question-id within the quiz, and based on those, it's simple enough to identify make up identifiers for the "correct answer" string and each of the "wrong answer" strings.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://601898]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2016-06-25 21:56 GMT
Find Nodes?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...

    Results (327 votes). Check out past polls.