Hi all, I’m adding a custom form/survey builder to my application. The general steps are:
When user begins form, a “response_summary” is created.
After user completes a question and presses continue, a “response_item” is created. The item is added to the summary, inputs are reset, and the next of the repeating group of questions is shown.
When the repeating group reaches the last page (question), the continue button’s label changes to submit and once pressed the “complete_survey” custom event is triggered.
When I first implemented all of this, it was working perfectly; the response_summary status was updated to submitted, the completion screen was shown (shows when status is submitted), etc. But for some reason, it all of the sudden stopped working. It shows the completion screen for a second (like it is submitted), but then it disappears and shows the last question again and gets stuck loading forever. In my database the status and submission date never get updated so it is like the custom event is never firing at all anymore or starts and then immediately stops.
I am very lost because I didn’t change anything with the workflows or add anything hefty to my app. I tried making the response_summary a parameter in the custom event also but I got the same problem. Any help is appreciated. Thank you.
your step 6 which triggers the custom event uses a condition that is ‘when repeatinggroup is on last page is yes’ this in my mind may be the problem.
To debug it, place onto the page a text in large font in red that is the expression used in that condition so as to see if it is evaluating properly.
Also, run the functions in a step by step or slow mode to see if that condition is evaluating properly.
But I see that entire series is based on a button continue click. You may opt to change that a bit, where instead of having the custom event triggered conditionally in that one series, you can have two element events of button continue is clicked with one having condition when RG is on last page is yes and a second when RG is on last page is no, so that you do not have to deal with consequences of Bubble not firing actions in a series in order since there is a strong possibility that the conditions on step 6 and step 7 are interfering with each other.
And yes, I understand, there may have been no changes made, and this may have been a setup working properly before, so the urge to not change anything is likely there, but give it a shot as it just might be the fix needed.
Thank you so much for your help! I tried what you suggested about two separate workflows and conditionals for the button and that seems to have fixed the problem. I guess it was actually a simple solution…Cheers!