Reputation: 4431
I have a form and up the top it contains four different radio buttons - the rest of the form changes depending on which of these radio buttons are selected. Currently each 'part' of the form is in its own fieldset and I'm hiding/showing these with Jquery.
How can I only submit the data that is relevant to which part of the form is filled out? I don't want to submit three empty areas on the form and only one filled in part.
Thanks.
Upvotes: 0
Views: 998
Reputation: 3387
you could $("#fieldset1").remove() the fieldsets on form submit. not as elegant as nivhab proposed but it's an alternative too
Upvotes: 1
Reputation: 687
Just create three different forms, separate your fields between them and then submit the right one. They can all point to the same URL...
Upvotes: 1