Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

stueynet's avatar

2 Forms on same page mix up the session data

With 2 forms on a page, the old() method on a form value field is not form specific. So if you attempt to change the data in one form and validation fails, it will populate the same named field in a totally different form on the page.

So lets say you have 2 forms that both have a field called email. When you update form 2's email field, and the data does not validate, it will populate BOTH forms with the invalid email data.

0 likes
2 replies
stueynet's avatar

Yup thats the solution. Only issue is that requires a lot of rewiring in the controller, models, request objects etc...

Please or to participate in this conversation.