This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 2
Multiple Choice & Checkbox Selection MySQL Data Entry
Started 15 years ago by getnbye | 2 posts |
-
First off... MachForm is awesome!
I shopped around for a while looking for a Form application and MachForm was the only one I found that done everything I needed.
I've created my form and several of the form questions require the user to answer as multiple choice answers.
My problem is that when I built my PHP grid to expose the form data, I was surprised to see that the answers are expressed as numbers in the grid.
When exposing the form information as data in a grid (MySQL) how do I expose the user responses as a reference to the form selection that makes sense to them?
I'm using the PHP Script generator from the SQL Maestro Group (another great application)
Here are examples of what I have thus far:
My form ---> http://www.65gs.com/form/view.php?id=2
My grid ---> http://www.65gs.com/3.phpNote elements 7 20 21 & 22 all based on checkbox or multiple selection form questions.
I've figured out that what is probably happening is that the number in the DB is simply a reference to a form selection stored elsewhere.
Is there anyway to have the form send the selection directly to MySQL to be exposed directly by the grid instead of sending a selection reference / number?
Of course if the form user inputed the information directly instead of using a checkbox or dropdown it'd appear, however for convienence and data accuracy this is not really a good option.
To have a checkmark show up in the grid for a checkbox marked in the form would be awesome as well as the multiple choice selection appear in the grid from any multiple choice form question.
This is all probably pretty simple to most folks reading this however I new to web design and this has got me a bit confused on how to adjust.
Thank you,
Chris
Posted 15 years ago # -
Hi Chris,
That is the intended behaviour indeed, only the index numbers are being stored into your form table, while the labels are being stored in another table.
This is necessary to optimize your database. If you need to get the labels, you will need to do a reference to "ap_element_options" table.
Using SQL, you can do a LEFT JOIN query for this.
I suggest to contact SQL Maestro Group and ask them how to put the join query into the script.Check this thread for more info:
http://www.appnitro.com/forums/topic/results-that-match-form-in-databaseMachForm Founder
Posted 15 years ago #
Reply
You must log in to post.