php - Pre-populating a multi stage form -
i have form split on 4 separate screens, user presented screen 1, fill out fields , click continue, presented screen 2, fill out fields , click continue, etc..
when fill out whole form, details have entered written mysql database.
they allowed go through form @ time , change details....this have question.
when navigate screen 1, read previous details database , pre-fill form values.
so far, good.
when click continue, form submitted , load screen 2. @ point, have read database again values entered on screen 2.
i should mention here i'm using mvc pattern each screen separate request. being able split each screen in separate request keeps html , controller logic nice , clean, i'm starting wonder if it's best way create multi stage form!
what best way handle need retrieve data @ each screen? thing can think of read data @ screen 1, , store in session variable, gaining doing that?
should bothered having keep re-reading same data? it's not going massive performance issue, feels wrong keep re-reading same data.
just looking advice has faced similar situation.
thanks,
damian
the answer, thought, read database on screen 1 , write screen 2, 3 & 4 fields hidden fields on screen 1.
this way, when screen 2 being drawn, check see if there values in $_post.
same applies screen 3 & 4.
Comments
Post a Comment