Form values not saving in the table - 2 cases

ataylor14 12 Aug, 2014
Hello.
There are two instances in which some of the data from my form does not save in the table:

1) dropdown selection if nothing was selected assuming the user just wants the default value

2) value of new textbox for which a field was added manually to the existing form table
I used the debug and it shows that the new textbox for which I manually created a column in the form table does not appear in the 'SQL insert query' as if it does not exist on the form.

Many thanks for your help.
Kind regards
Amelia

I had a look at similar questions and found an answer to 1) but I cannot understand it as it is probably suited for an older version of chronoforms not v5. Below is that answer to solve 1)

'Please drag a Handle Arrays action into the OnSubmit event and move it up before the DB Save action'
ataylor14 12 Aug, 2014
I want to add information to the question 2) above.
I used the debug and it shows that the new textbox for which I manually created a column in the form table does not appear in the 'SQL insert query' as if it does not exist on the form.
GreyHead 12 Aug, 2014
Answer
Hi ataylor14,

For 2, please click the Delete Cache icon in the Forms Manager toolbar after changing the Database table. Apparently CFv5 keeps the table structures cached to cut down on the number of queries.

Not sure that I understand 1 :-( The Handle Arrays answer only applies if it is a multiple-choice drop-down. If the default value is selected then it 'should' be submitted. Is the default specifically set in the select drop-down element or just the first option in the list?

Bob
ataylor14 13 Aug, 2014
Hello Bob
Thanks for answering 1) I will try it out.
for 2) I will try to explain the behavious of the form that I saw in my tests.

I have a dropdown list that displays a default option.
Case 1) A user fills in the form but does not touch the dropdown list as he is happy with what he sees as the default option. In this case the value of the drop down does not get saved in the table when the form gets submitted.

Case 2) A user 'clicks' on the drop down and selects something (even just clicking on default option) then the value of the drop down gets saved in the table.

I hope this explains my question.
Many thanks
Amelia
GreyHead 13 Aug, 2014
Hi Amelia,

Please post a link to the form so I can take a quick look.

Bob
ataylor14 14 Aug, 2014
Good evening and thank you for replying to my question.

The form I am working on is on my local joomla installation. Can I send images of the form and the settings?
Are there some settings that would force a drop-down not to POST any data unless it is 'actually' clicked and selected by the user?


Thank you.
Kind regards
Amelia
GreyHead 15 Aug, 2014
1 Likes
Hi Amelia,

Max posted in another thread that the validation code assumes that the first option is a 'Please select' option. I'm not sure that is safe but it might explain the problem here. Please try adding a 'Please select' option as well as the default and see if that fixes it. If not, Please take a Form Backup using the icon in the Forms Manager and post it here (as a zipped file) and I'll take a closer look.

Bob
This topic is locked and no more replies can be posted.