Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Form validation with messages
  • For my request, Fuel 1.5 includes the possibility to save the Session flash variables immediately, not just on shutdown event. This is helpful, when you validate a form, and do not want to pass the Validation directly to the view, but want to pass it to some kind of Messages class that displays it on the view. For this solution we need to be able to set and get the session flash var on the same page request.

    Do you have any better solution for that?
    My idea is to have an own data modell for messages which is a layer in front of the session flash. The messages are written to flash on shutdown, so that I can get the messages on the same page request, and only store those, which are not shown on the same page it set (not a Validation message).
  • I don't understand the question. It's no problem doing a set_flash() and get_flash() within the same request.

    Using a Messages class to centralize message processing is a better idea though, separate from the flash variable issue.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion