Forums

One field not saving to DB created by Chronoforms5

dzseti 05 Mar, 2014
This may be problem due the order in which I did things:

1) copied an exsiting form to create a new one - renamed and set up a new DB using Chronoforms to store form data
2) initially tested ok
3) added a new free text field to the form - added a a new column to table in phpMyAdmin
4) during testing all data continued to be saved except the new field - clearly the data was there according to both a dump() and according to the auomated e-mail sent
5) tried to rectify by deleting DB and using Chronoforms to set up a new DB with the new field - table set up ok, but problem of missing data persists
6) also tried deleting the Save DB module and adding a new one (exactly the same) but this dod not solve the problem

Any ideas?
Max_admin 13 Mar, 2014
Hi dzseti,

Hows it now ? did you manage to solve this ? it might have been the db cache, you could also try to click the "delete cache" button under the "Forms manager".

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 14 Mar, 2014
Hi dzseti,

If you turn debug on can you see the MySQL query that is being created - that is often helpful. Are the input name and column name identical?

Bob
dzseti 25 Jul, 2014
Back to this problem again after a long break (from having started a completely new form)

Have added and removed fields from a form, but when I add and remove fields from the database, the next time I look at its structure all changes have been ignored and reset - the debug output however shows the new fields (and an old one than refuses to go away)
dzseti 25 Jul, 2014
I should be clearer on the SQL - the SQL structure itself is remaining as I amended it, but when I click new database for the form, then the old fields appear - and data is appearing in the new fields ...
So it seems more of a back end issue than operational front end ...
Max_admin 27 Jul, 2014
The issue is not clear, please try to click "Delete cache" in the "Forms manager" after you do the database table changes ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
trigx300 29 Oct, 2014
I have the same issue. debug shows that the array is missing the new field as well as the sql. Only the automated email is updating correctly. (I've tried deleting the cache and all the other suggestions above)
Max_admin 29 Oct, 2014
Hi trigx300,

If the field is not listed in the debug then it can't be saved and can't be in the email.

how did you add the field to your form ? using the designer ? you are using the field's name to reference it, correct ?

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
trigx300 30 Oct, 2014
Hi Admin, Thanks for responding🙂

I've created a form and have been able to successfully save data to the DB.
I later modified the form using the designer to add a "file" field (used to upload a file to store it for download) name=file, id=file
I've successfully modified the on submit email part of the setup tab and have been able to receive the file via email as an attachment. I've also been able to upload the file. I then created a new field (varchar 255) via phpmyadmin but when I test the form data is stored in all field but the file one.
GreyHead 30 Oct, 2014
Hi trigx300,

Please drag a Debugger action into the On Submit event, then submit the form and post the debug results here.

Bob
Max_admin 30 Oct, 2014
Did you try to click "Delete cache" in the "Forms manager" ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
trigx300 31 Oct, 2014
Array
(
    [14] => Array
        (
            [DB Save] => Array
                (
                    [Queries] => Array
                        (
                            [0] => INSERT INTO `tickets` (`Company`, `Status`, `Type`, `Description`, `Assigned`, `button6`, `user_id`, `uniq_id`, `created`) values ('', 'Open', 'Support request', 'test description text', '', 'Submit', '0', 'e1d61682f0823cabd7fb919e3987862860b160ee', '2014-10-31 16:06:16');
                        )

                )

        )

    [0] => Array
        (
            [Email] => Array
                (
                    [0] => An email with the details below could NOT be sent:
                    [1] => To:
                    [2] => Subject:
                    [3] => From name:
                    [4] => From email:
                    [5] => CC:
                    [6] => BCC:
                    [7] => Reply name:
                    [8] => Reply email:
                    [9] => Attachments:
                    [10] => Body:
<table>
<tr><td>Company</td><td></td></tr>
<tr><td>Contact Email</td><td>noemail@noemail.com</td></tr>
<tr><td>Status</td><td>Open</td></tr>
<tr><td>Type</td><td>Support request</td></tr>
<tr><td>Description</td><td>test description text</td></tr>
<tr><td>Attach File</td><td></td></tr>
<tr><td>Assigned to</td><td></td></tr>
</table><br /><br />IP: 173.196.136.3
                )

        )

    [1] => Array
        (
            [Email] => Array
                (
                    [0] => An email with the details below was sent successfully:
                    [1] => To:noemail@noemail.com
                    [2] => Subject:
                    [3] => From name:
                    [4] => From email:
                    [5] => CC:
                    [6] => BCC:
                    [7] => Reply name:
                    [8] => Reply email:
                    [9] => Attachments:
                    [10] => Body:
<table>
<tr><td>Support request</td></tr>
<tr><td>Status</td><td>Open</td></tr>
<tr><td>Description</td><td>test description text</td></tr>
</table>
                )

        )

)
Max_admin 31 Oct, 2014
This doesn't answer my question in the last post!🙂

Also your email settings are incomplete!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
trigx300 03 Nov, 2014
Sorry I missed that. I did try the delete cache and it did not work.

In order to recreate the problem and simplify I've created a new Simple form and called it "test form".
Using the designer I create 2 text box fields and a submit button. I save the create a table through chronoforms and call it testform. I open the form and enable data save and select my testform table. Then I test the form and verify via phpmyadmin that it is working and data has been successfully stored.

Now I open my form again and change the mode from simple to advanced, save then I add a new text box field. (default name + id is text4) I save then I test the form. I notice via phpmyadmin the table structure has not been altered. and the new data has been stored but not the new field. I then create a new column via phpmyadmin. then I test the form again.

The data is stored but the data that should be in the new column is not there.

Here's the debug from the last test:

Data Array
Array
(
[option] => com_chronoforms5
[chronoform] => testform
[event] => submit
[text1] => testing1
[text2] => testing2
[text4] => testing3
[button3] => Submit
[id] => 4
)
Array
(
)
Errors
Array
(
)
Debug Info
Array
(
[11] => Array
(
[DB Save] => Array
(
[Queries] => Array
(
[0] => INSERT INTO `testform` (`text1`, `text2`, `button3`, `user_id`, `uniq_id`, `created`) values ('testing1', 'testing2', 'Submit', '0', '2dd8fcad4cc480f3f68a5b413ae3027fd8056db3', '2014-11-03 07:06:18');
)

)

)

)

I hope this is a little more clear.

Thanks for helping😀
GreyHead 03 Nov, 2014
Hi trigx300,

The sequence needs to be:
. . . I then create a new column via phpmyadmin . . . click Delete Cache . . . then I test the form again.

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