pfavaro
|
| Posted: 02/03/2006, 3:29 AM |
|
I have a questionnaire application. After the user fills out the questionnaire some php code will analyze the answers and describe them in text-report form. The questionnaire has 50 fileds Q1...Q50. The values of these fields can be from 1 to 5 so they are integers.
First, how do I reference the values of the field in my code? I have tried a number of ways. For instance. I have on Before Show declared the fields as variables, but when I do this I do not know how to set the default value of the field to the integer that is stored in it. If I leave default value empty it assumes it is 0. If I put Q1 as the default value is gives me an error. What is the format for declaring the default value as the value in the field itself?
Second, in my custom code, how do I reference the value of any field in general. For instance if I want to add Q1 and Q2, how do I refer to these values in my code?
Thanks
|