Jump to content

How to create an advanced contact form?


lbh2011

Recommended Posts

Hey everyone,

 

I am looking to create an advanced contact form but need someone to point me in the right direction.

 

I need to create a customer service form and would like it to contain the usual fields e.g. Name, Email etc. but also want to include a drop down field which has a couple of options e.g. Sales Enquiry, Order Status etc.

 

Once one of those options has been selected e.g. Order Status, I then want a further section of the form to appear where the user can input data such as their order number, order date etc.

 

Does anyone have any ideas on how to achieve this or know of any demos/scripts which they think might help.

 

Link to comment
Share on other sites

This is really more client side to be honest.

 

You just need some jquery and some logic within your jquery.

 

specifically you'll use the .change() function to register when a new selection has been made (i.e. from your drop down) and this would fire off the code for the new piece of the form you want to display.

 

This should point you in the right direction - http://api.jquery.com/change/

 

You could of course load the form elements using ajax but i cant exactly see why it would be worth sapping server resources for soemthing that can be done client side :)

 

 

 

Hey everyone,

 

I am looking to create an advanced contact form but need someone to point me in the right direction.

 

I need to create a customer service form and would like it to contain the usual fields e.g. Name, Email etc. but also want to include a drop down field which has a couple of options e.g. Sales Enquiry, Order Status etc.

 

Once one of those options has been selected e.g. Order Status, I then want a further section of the form to appear where the user can input data such as their order number, order date etc.

 

Does anyone have any ideas on how to achieve this or know of any demos/scripts which they think might help.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.