January 14, 201115 yr Hi Guys, One of my clients requires two contact forms on one page which he would like to be done using JQuery. One contact form is for "New customers" and the other for "Existing Customers". Only one of these forms can be showing at anyone time and it must be non confusing for the client. I have been toying with the idea of using tabs or maybe even a sliders? What would you use in this scenario? If you can find any JQuery addons that would do this could you post them! Cheers guys
January 14, 201115 yr how do you determine if they are a new or existing client? If it's a PHP page then can't you just condition which form is shown?
January 14, 201115 yr Author This has do be done while they are logged out. I was planning on just using this. http://jqueryfordesigners.com/demo/coda-slider.html I would remove all of the tabs bar two naming them new and existing clients!
January 14, 201115 yr I would just make two nice, large, elegant buttons 'Existing Client', 'New Client'. Make them link to /the-page/?client=existing and /the-page/?client=new. You can then use $_REQUEST to decide which form to show with some PHP. This will deal with those with Javascript disabled. On the selection page, print both forms HTML but set them to display:none in your CSS, then add some jQuery for those with Javascript enabled. You can then catch the .click() function on the buttons to prevent page reloading and just hide the buttons/show the appropriate form. Probably 5 lines of jQuery. These two methods combined will enable the forms for everyone, in an understandable way. Those without stylesheets enabled will see both forms since display:none will have no effect, so make sure you label the forms nicely for that minority. Edited January 14, 201115 yr by andyl
January 14, 201115 yr If you have two separate forms and one button for each, why not use jQuery expand/contract show/hide code to show only one form when the appopriate button is clicked? PHP can do this too. I've got a PHP example here in item 1 http://www.wickham43.net/showform.php Click Form Example and the form will show. You could have two links or buttons for two forms (only one at a time will show). Edited January 14, 201115 yr by Wickham
January 14, 201115 yr Author Cheers for all of the help guys. I do like the elegant button idea that sounds great!
Create an account or sign in to comment