Hello, i am new to slim v4 and try to build a web app following @odan 's ebook.
I have a form created by FormAction class, form data is sent via POST method to SubmitAction class
which writes form-data to a file and shall return back to the initial FormAction class which should read the file and display the updated data.
Things work as expected BUT when i redirect to FormAction class using
How do you handle the form? Do you have any type of form validation? Do you use ajax or not?
The server does not cache the form data. What do you expect after the form has been submitted and saved, and what do you expect when you have an input / validation error?
Can you please add more details and screenshots?
this is a “rough sketch” of project, so there is no ajax involved, no form validation middleware.
To see the behavior please visit http://dienstplan.galak.online/wuensche. You will find a more or less complex form for a duty roster with names and dropdown fields to select “d” for duty or “f” for free.
When clicking the submit button, form data gets stored (confirmed working) by “WishSubmitAction” which redirects back to the calling form. I expect to see the form data updated but this does not happen. But when i hit F5 to reload, i see the updated from data.
as i said: i thought there was some kind of caching going on.
Meanwhile I found my mistake. I put too much logic in the __construct function of my worker class. Moving the “loading stuff” to its proper function fixed the behavior…