Welcome Guest, Not a member yet? Register   Sign In
Separation of logic versus content inquiry
#2

[eluser]Michael Wales[/eluser]
I would do as you said - query in the model, logic in the controller. I would then set a variable to TRUE/FALSE based on whether it was checked or not. Then in my view, I would echo 'checked' if that variable was TRUE, nothing if it was not - thus, checking the box appropriately.

Another way would be to set that variable to ' checked' or '' and echo that out in your view - but that's lacks the beauty of the TRUE/FALSE to me and is less extensible in the future.


Messages In This Thread
Separation of logic versus content inquiry - by El Forum - 08-16-2007, 01:57 PM
Separation of logic versus content inquiry - by El Forum - 08-16-2007, 02:13 PM
Separation of logic versus content inquiry - by El Forum - 08-16-2007, 02:17 PM
Separation of logic versus content inquiry - by El Forum - 08-16-2007, 02:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB