0

Hi Admin..!!

i want source code in php+ajax for a form, in such a way that, suppose i have a form in php, with 10 different fields, when the user fills that form, the fields next to gender should automaically change, like the remaining fields must be different for Male and Female.
As soon as the user selects his/her gender, the form fields must change....
Please help me out in getting code for this....

4
Contributors
3
Replies
4
Views
4 Years
Discussion Span
Last Post by EvolutionFallen
0

I don't think that anyone will code that for you. The forum is for help and discussion, not for us to code for you.

If you want help you'll get it, but if you want somebody to do the job for you, you won't.

0

Give it a try first, post your code, ask for specific help on an item that you cant figure out.

0

As the above two said, we're not here to write your code for you from scratch. However assuming you can code, here's a concept to point you in the right direction:
1. Two radio buttons for gender, one with ID male, the other with ID female.
2. Two separate DIVs or FIELDSETs. First has the fields for if MALE is selected, second has the fields for if FEMALE is selected. Both start off hidden.
3. Using JavaScript, detect when one of the buttons is clicked. If MALE is clicked, hide the FEMALE DIV, show the MALE DIV. If FEMALE is clicked, hide the MALE DIV, show the FEMALE DIV.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.