Three ways: 1. Re-run your JS. 2. Do same logic when output form. 3. When show/hide fields by JS, keep form state in some hidden field (s) and show/hide when output form based on its value(s).
On Oct 10, 9:37 pm, emmexx <[email protected]> wrote: > I'm using javascript and ajax to show/hide fields in a form depending > on the selected values of one or more fields. > The user chooses a value from a select and some other field is shown > or hidden. > > When the user submits data and there's a validation error the form > reloads and the visibility value of the fields is lost. > > Is there a cake way to reload the form the right way or I have to > rerun all the javascript code that checks values and hides/shows > fields? > (I know, I'm asking too much from cakephp...) > > Thank you > maxx --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
