craue / CraueFormFlowBundle

Multi-step forms for your Symfony project.
MIT License
736 stars 118 forks source link

How to increase the time before the expiration of the flow? #322

Closed eved42 closed 4 years ago

eved42 commented 6 years ago

Hi, I have a form with only 3 steps but I have to do a long research in my database before submiting the form.

If this research take a long time, the user can't submit it's form because the flow is expired. It is possible to increase the expiration time of the flow ? If yes, how ?

Thank you.

(Project under Symfony 3.3)

craue commented 6 years ago

Assuming the session is used to store flow data (which is the default), you'll need to increase the session lifetime.

eved42 commented 6 years ago

Ok thank you for your answer.

According to this post, I will test this :

// config.yml
framework:
    session:
        cookie_lifetime: 7200
        gc_maxlifetime: 3600

GC (garbage collection) will be reset every time the server is hit, meaning if the user is active, he'll have 3600 to continue working. The cookie_lifetime will force the user to log out in its limit. In this example, the user will have one hour to be inactive and will be forced out in 2 hours.

Documentation : click here