Using ajax watches on the fields (observe_field) I then passed the values
that were being entered to a validation action to run validation using the
base validation rules symfony has for things like email etc and then only
allowing the "Next" button to become visible once no errors were generated.

On 2/19/09, Ant Cunningham <prodigital...@vectrbas-d.com> wrote:
>
>
> Well he is only talking about hiding/showing elements, not actually
> adding elements via AJAX requests. So in theory you could for example
> collect all the element id's with errors and then show those elements as
> opposed to the inital state of the form.
>
> Note i havent actually done this, it was jsut the first thing that
> popped into my head.
>
>
>
> John Masson wrote:
> > Hi Gareth,
> >
> > How do you go about doing validation on such a form? I've tried in the
> > past (admittedly only in 1.0) to do AJAX based forms mainly relying on
> > the observe_field tag acting on various drop downs or checkboxes to
> > populate hidden divs with new form fields based on what the user is
> > selecting. The problem with this is that it always comes unstuck when
> > the user submits the form with validation errors - While the initial
> > form will be redisplayed with all of the
> >
> > Because of this I've always stuck with a multi page approach (like
> > Richmeister) where I do a submit/validate/save to session for each
> > separate form until the final one where I pull everything back out of
> > session and write it to the DB along with the values from that final
> > form.
> >
> > Would love to hear how you've dealt with it using AJAX!
> >
> > JM
> >
> > On Feb 20, 6:15 am, Gareth McCumskey <gmccums...@gmail.com> wrote:
> >> Or you could do what we did and make all three forms into one large form
> and
> >> just use the prototype/scriptaculous effects to move from the "1st form"
> to
> >> the "2nd form" by hiding and displaying the form widgets at specific
> times
> >> or hiding and displaying the divs the form widgets are in.
> >>
> >> On 2/19/09, Richtermeister <nex...@gmail.com> wrote:
> >>
> >>
> >>
> >>> Hi Justin,
> >>> alternatively you really treat each form individually, and save the
> >>> valid data in the session each time, only forwarding to the next form
> >>> when the required data has been entered.
> >>> At the last form you save all to the database. I find that these kind
> >>> of process flows often need so much custom love, that using a plugin
> >>> doesn't always solve things.
> >>> Hope this helps,
> >>> Daniel
> >>> On Feb 18, 5:55 pm, Justin Davis <jdavis1...@gmail.com> wrote:
> >>>> Hey all -
> >>>> First post on the list, really loving the community that is supporting
> >>>> symfony.
> >>>> I'm somewhat of a newb, but definitely making some progress.  I've run
> >>> into
> >>>> a problem I can't figure out.
> >>>> I've got a series of forms (3 of them), that need to be filled out in
> >>>> series, one per page.  I'd like the information from the forms saved
> to
> >>> the
> >>>> database when the 3rd form is submitted, not after each one
> individually,
> >>> so
> >>>> I'll need to somehow carry the data from the earlier forms through to
> the
> >>>> last submit, then save everything to the database there (into three
> >>>> different tables).
> >>>> I've looked thru the documentation and symfony forums and haven't
> found
> >>> much
> >>>> help.  Do you bind the form, then put it into the session, or is there
> >>>> another way?  The more specific you can be about particular actions,
> >>> etc...
> >>>> would be really helpful.
> >>>> Thanks for all your help!
> >>>> Justin Davis
> > >
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to