Tom
Tom

Reputation: 4431

Jquery Dynamic Form - Quick Question

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

Answers (2)

miceuz
miceuz

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

nivhab
nivhab

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

Related Questions