-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 aSecondWill wrote: > Hi Hector, > > Thanks. The issue i was facing was that both forms where throwing validation > errors if they both had code in the same action to proccess them. > > Have you used this technique for two forms within the same action?
Using the standard post-handle-redirect structure. If there is more than 1 form on a page, I usually have the "secondary" forms posting to their own actions, and only the "primary" form handled by the current action. For example, a login form may exist on every page, and its target would be the action where the login form is the primary page (the login page). So if validation fails, you get that forms primary page, with the validation notices, if it's valid, then handle it and redirect back to where you came from (or elsewhere if the forms purpose dictates). I haven't used it with more than 1 "primary" form on a page though. - -- Brenton Alker PHP Developer - Brisbane, Australia http://blog.tekerson.com/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkpxTycACgkQ7bkAtAithuvs8gCbBlMbUTtoKoRPNU0PTNpTnyBO 6cEAn2C7DDnwdttWmvDvIXYP8NebsT1Y =0GYb -----END PGP SIGNATURE-----
