Hello everybody!!!
If anybody can help I would very very appreciate this!
The problem is that I’m trying to build a survey! In admin screen there is choice of questions to create (check box, radio, combo and comments)
Once admin creates questions with particular radio buttons set, then he can add answers with radio buttons next to it.
Then it adds all that to database.
For users to see this survey with multiple questions and answers I have created form in which all this is visible. For radio buttons to appear I need to loop through the query which selects all created questions and answers. However, for radio buttons to appear as grouped I use name = #questionID# from query – so that radio buttons will be grouped for each question.
My problem is since it is like:
<CFLOOP query="radioCheckView">
<INPUT type="Checkbox" name="selCheck" value="<CFOUTPUT>#checkBoxQuest#</CFOUTPUT>"> <CFOUTPUT>#checkBoxQuest#</CFOUTPUT><br>
</CFLOOP>
Once user submits the form, all answers should be inserted into database.
How then this radio button can be identified when you submit?
<CFIF isDefined("Form.Submit")>
<CFOUTPUT query="ViewQuests">
<CFQUERY name="UserInsert" datasource="surveyDB">
INSERT INTO answers
(questID, comments, radio)
VALUES
(
#questID#,
'#form.comment#',
'#form.??????????? #' – “Don’t know what should I write here”
)
</CFQUERY>
</CFIF>
Please guys if you know how to solve this problem – help me!
THANK YOU VERY VERY MUCH IN ADVANCE!
If anybody can help I would very very appreciate this!
The problem is that I’m trying to build a survey! In admin screen there is choice of questions to create (check box, radio, combo and comments)
Once admin creates questions with particular radio buttons set, then he can add answers with radio buttons next to it.
Then it adds all that to database.
For users to see this survey with multiple questions and answers I have created form in which all this is visible. For radio buttons to appear I need to loop through the query which selects all created questions and answers. However, for radio buttons to appear as grouped I use name = #questionID# from query – so that radio buttons will be grouped for each question.
My problem is since it is like:
<CFLOOP query="radioCheckView">
<INPUT type="Checkbox" name="selCheck" value="<CFOUTPUT>#checkBoxQuest#</CFOUTPUT>"> <CFOUTPUT>#checkBoxQuest#</CFOUTPUT><br>
</CFLOOP>
Once user submits the form, all answers should be inserted into database.
How then this radio button can be identified when you submit?
<CFIF isDefined("Form.Submit")>
<CFOUTPUT query="ViewQuests">
<CFQUERY name="UserInsert" datasource="surveyDB">
INSERT INTO answers
(questID, comments, radio)
VALUES
(
#questID#,
'#form.comment#',
'#form.??????????? #' – “Don’t know what should I write here”
)
</CFQUERY>
</CFIF>
Please guys if you know how to solve this problem – help me!
THANK YOU VERY VERY MUCH IN ADVANCE!