Forums

Form sometimes does not save (and email) records

Werbisci 26 Apr, 2019
Hello!
Recently I've updated to CF 6. I've enabled DB Save action. Most of the time everything works fine.
However sometimes the form does not save any records. It is apparently filled correctly as the sender receives confirmation email but the DB record is empty and the form is not sent do the Administrator.
Strange because in about 80% of the cases everything works as expected - emails received, DB saved correctly etc.
I can't find the rule why it happens only in some cases.
Would you have any suggestions? Could it have anything to do with cookie settings on user's computer? Or maybe the browser?
Or maybe I should have created the form from scratch instead of importing the CF5 version?
In any case the point is that it works perfectly ok but sometimes fails.πŸ™‚
​
Regards and thanks!
Simon
Max_admin 26 Apr, 2019
Hi Simon,
​
The form is displayed inside an article or in its own page using a menu item of type Chronoforms6 ?
​
Best regards
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Werbisci 27 Apr, 2019
Hello Max, thanks fo the reply!
The form is displayed on its own page as a menu item.
However, that might be a good point, sometimes the link to it is created directly from Joomla menu and sometimes manually using HTML tag. Do you think that could cause the problems?
​
Simon
Max_admin 27 Apr, 2019
Please try to find when the problem occurs, with the menu only or also when the form is called with HTML tag ? and what do you mean by HTML tag ?
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Werbisci 29 Apr, 2019
Thanks Max!
I will give it a try and will try to figure out where the problem lays. Strange because over the weekend we've got about 30 correct submissions (records saved properly) and 2 empty records (but confirmation email were sent).
For the record of this forum I will write when I get more info and when I find the source of the problem.
With HTML tag I didn't express myself clearly, sorry!πŸ™‚ What I meant was that the form is created on its own page but can be accessed from different location on the page, e.g. from main menu or from the link inside the article. And there the link differs - sometimes it is ".../index.php/zamow-msze-swieta-4kroki/zamow-intencje-mszalna" (www is in polish) and sometimes "/index.php/intencje-mszalne?view=form".
So maybe that could couse the problem.
Anyway will I give it a try!
​
Thanks -
Simon
GreyHead 29 Apr, 2019
Hi Simon,
​
There can be problems with forms not being submitted when they are embedded in a page and use the page url to submit. You can avoid these by setting the form Action URL to the full form URL + &event=submit
​
However, if you are getting submissions that fail after the user email and before the data save or admin email it looks as if there is some kind of error there. What is the sequence of actions in the form On Submit event?
​
Bob
Werbisci 29 Apr, 2019
Hi Bob,
Many thanks for your reply. I think that in my case the second situation you described occurs. The strangest thing is that there are about 20-30 submissions a day and only 3-4 of them fail. The rest is perfectly correct.
​
The sequence of actions in the OnSubmit event is as follows (see attached graphic)
1. Validate Fields (default setting)
2. Save Data (default settings apart from proper DB table name)
3. Custom code (text with thanks aftef sumbiting)
4. Email to the administrator
5. Email to the sender.
​
As I said most of the time it works fine. But sometimes fails and I can't find the clear reason why.
I have found one mistake in HTML. As the form has been upgraded from CF5 version there were left graphics with link set to "index.php?option=com_chronoforms5&view=form&Itemid=424". And should be "...com_chronoforms6...."
Maybe that was the reason. I have changed it and see what happens.
​
Simon
Werbisci 29 Apr, 2019
Forgot to attach the graphic.
Here it is. :)
Simon
GreyHead 29 Apr, 2019
Hi Simon,
​
You also need actions in the two Fail events to re-load the form when an error is detected - at present it looks as though the submission will continue.
​
Bob
Max_admin 29 Apr, 2019
It must be caused by the empty fail events as Bob has noted, if the submit url is accessed directly then you will have empty records/emails.
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Werbisci 30 Apr, 2019
Thank you, Bob! Thank you Max!
I've inserted "loop event" action in the fail events section.
We'll see what happens.
​
Simon
Werbisci 30 Apr, 2019
Just one more question: what should I put as a data provider in the "loop event" action? It is marked as requited.
See the attached graphic.
Thank you!
Simon
Max_admin 30 Apr, 2019
Answer
You need "Event loader", not Loop event!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Werbisci 01 May, 2019
1 Likes
Thank You Max!
Of course that should be "event loader". My mistake!
Simon
This topic is locked and no more replies can be posted.