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
Drop downs not entered into database correctly
Started 16 years ago by kirbykm | 2 posts |
-
I've done some meddling with the script so that I can incorporate a javascript function to add some of the fields. The idea is that someone selects a number from several drop downs and it adds them all together into a total field. I've gotten it to work on the front end, however I think that some of the code that I change has messed something up.
I only modified the view-functions.php file. I change this line:
$option_markup .= "<option value=\"{$option->id}\" {$selected}>{$option->option}</option>\n";
to this:
$option_markup .= "<option value=\"{$option->option}\" {$selected}>{$option->option}</option>\n";
so that the value would be the same as the option name and could be added in the javascript function.
What is happening is that when someone chooses say "5" from a list of 1, 2, 3, 4, 5 it puts "4" into the database.
I'm not sure if this makes any sense, but if so, any help on this would be appreciated. It looks like all it is doing is entering the option before the selected option in the drop down list in the database.
Posted 16 years ago # -
Check the records on your ap_element_options table.
For your particular form_id and element_id, make sure the values on the column option_id and option are having the same values.
MachForm Founder
Posted 16 years ago #
Reply
You must log in to post.