Re: multiple question form creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> Hi,
>
> i have a web application in which some people should be able to create form
> adding questions and possible answers.
> basically user should:
> 1. type the question (which will be displayed to customer)
> 2. select type of answers (closed, open, list, multiple answer, and so
> on...)
> 3. add possible answers (could be several answers for 1 questions)
>
> what do i wonder it's how to do it in easy and nice way.
> I mean:
> 1. should i have 1 page asking for question title, 1 page for answer type
> and (for each possible answer) 1 page for each answer ?
> 2. should i have AJAX which will store data into session before storing
> into DB ? in this case it could be a 3 div content: 1 for question, 1 for
> new anwser type (a combobox for example) and 1 div for each new answer...
> but in this case how can i allow user to tell to system "hey, i need to add
> another answer for this question" ?
>
> i really would appreciate some help as it is not so hard to do it but to do
> it nice and well (userfriendly in fact) it is a little more complex.
>
> thanks a lot for your help.



Alain,

I would make everything on a single page.

A text input for the Question Title
A dropdown list for the different types
A textarea for the answer section

Then below the form just put two buttons:

"Finished" which will save the last question and take them to your homepage
"Submit Another" which will save the current question and then blank our the
answer textarea

You can use AJAX to make it seemless as far as the submission of data goes,
or you could do <?php echo $_SERVER['PHP_SELF']; ?> as your submit action.

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux