Welcome Guest, Not a member yet? Register   Sign In
form validation on detail screen
#11

(This post was last modified: 05-13-2016, 10:48 AM by cartalot.)

hasten to add that none of this is criticism at all -- i'm just trying to really dig into this and see if i missed anything. also in my project i am not doing anything in the view and i'm doing more then the example i wrote out - i'm also building out the form label, bootstrap css code and some other things to then make it faster to build large forms and still have control of a flexible layout.

i'm kind of going back and forth whether i like this way or not versus what i posted previously. because with this way - it seems like its really only helping for one condition - the form not validating. and another complication is you have to populate and pass $product or $user in order to show a blank form. which would be ok, but then you also lose the final safety check after the insert or update - maybe the database procedure or whatever munged the data. you are not actually looking at what is in the db. so then yes you could do a redirect or something to show the real data - but then at that point i'm like hmmm maybe assigning value in a separate pass is actually the most flexible. but again that is prebuilding the form, not trying to do something directly in the view. i think for a simple form built in the view this is a great solution.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB