I’m building a form used in the signup process of a project. Between each page, I would like to persist the entered data to a entity, saved in a CRM. So, if a user doesn’t complete a signup, we at least got data so we can contact them.
Different from a Finisher, this is suppose to happen between each page and not just at the very end.
There is the onSubmit method described in the docs. This requires me to implement my own Page object and use that in my custom FormFactory class.
Is this the way to go?
And how what I do that? Add a Element to hold a Uuid from the CRM?
Does anyone here have had a similar usecase and did the same?
That can get a little tricky (consider what happens if the user clicks back and forth through the form pages).
You could send the intermediate steps via AJAX asynchronously but, yes, you can also do that via PHP.
@bwaidelich I haven’t been back to test it yet. Another solution that came up, was simply to create a new Page element for each page or look at how Neos.Setup does it’s callback - it seems to be very custom but could be more of the way I wanted to take it.
Rest assured that I will get back with a solution somehow
@sorenmalling Calling onSubmit on the $page somewhere here could work. But I’m not 100% sure what to send as 2nd argument (a reference to the “$elementValue”)…
Also, do you still need that mechanics or why not go for the “PersistedPage” approach?