CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   JavaScript programming (http://www.codingforums.com/forumdisplay.php?f=2)
-   -   Submit button or Address Form (http://www.codingforums.com/showthread.php?t=283924)

ammweb 12-10-2012 06:30 PM

Submit button or Address Form
 
On a form, depending on what they select will depend on if an address form appears or just a submission button. There are five possible choices. If two of them are selected it will produce an address form for them to fill out, If any of the other three, it will just provide a submit button. What is the best way to set this up?

If they select 1 then address form
If they select 1 & 2 then address form
If they select 1, 2, 3, 4, or 5 then submit button
If they select 3, 4, or 5 then submit button

It is not a select list, these are all separate.
The first choice is a checkbox fields, second choice is a textarea,
If they select either or both of these--I want an include file with address info to appear, along with the submit button,

The third, fourth and fifth choices are dropdown list and radion buttons with money values, if they select any of these, I don't want the include file with the address info to come up and only a submit button would be available.

Does this make more sense?

Philip M 12-10-2012 06:37 PM

Quote:

Originally Posted by ammweb (Post 1298811)
On a form, depending on what they select will depend on if an address form appears or just a submission button. There are five possible choices. If two of them are selected it will produce an address form for them to fill out, If any of the other three, it will just provide a submit button. What is the best way to set this up?

If they select 1 then address form
If they select 1 & 2 then address form
If they select 1, 2, 3, 4, or 5 then submit button
If they select 3, 4, or 5 then submit button

Sorry, I don't understand.

Are you talking about a <select> list with select multiple? select 1 & 2?

If user selects 1 do they see both the address form and the submit button?

ammweb 12-10-2012 07:19 PM

It is not a select list, these are all separate.
The first choice is a checkbox fields, second choice is a textarea,
If they select either or both of these--I want an include file with address info to appear, along with the submit button,

The third, fourth and fifth choices are dropdown list and radion buttons with money values, if they select any of these, I don't want the include file with the address info to come up and only a submit button would be available.

Does this make more sense?

ammweb 12-10-2012 07:20 PM

It is not a select list, these are all separate.
The first choice is a checkbox fields, second choice is a textarea,
If they select either or both of these--I want an include file with address info to appear, along with the submit button,

The third, fourth and fifth choices are dropdown list and radion buttons with money values, if they select any of these, I don't want the include file with the address info to come up and only a submit button would be available.

Does this make more sense?

Philip M 12-10-2012 09:32 PM

Quote:

Originally Posted by ammweb (Post 1298825)
It is not a select list, these are all separate.
The first choice is a checkbox fields, second choice is a textarea,
If they select either or both of these--I want an include file with address info to appear, along with the submit button,

The third, fourth and fifth choices are dropdown list and radion buttons with money values, if they select any of these, I don't want the include file with the address info to come up and only a submit button would be available.

Does this make more sense?

Only marginally. I don't know how you "select" a textarea.

Place the elements which you want to hide/show within a <div> set initially to style="display:none"

Then get the values of the form elements you mention. Perhaps onchange.

Show/hide the divs as required using style.display="block"; or style.display="none";
according to the combination(s) of form element values.

As you don't show your HTML that is the best I can do.

ammweb 12-10-2012 10:58 PM

Here is the link page that I am working with:
http://www.amm.org/PrayWithUs/decrempt.aspx?

At the bottom you will see, it features Your Name and Address info.
I don't want this to show up on this page, unless the person checks only the check boxes under My Intentions and/or fills in text under Special Intentions at the top of the page.

So if the person fill out the check box and nothing else, I want the Address Info to show up at the bottom,
BUT if
a person checks the check box and also selects a dropdown box under "Votive Light Offering" or selects a radio button under "I wish to make a donation" I don't want the Address Info to show up--just the submit button.

Does this make more sense?

Thanks for your patience!

Philip M 12-11-2012 10:33 AM

You did not mention that your page is using jQuery. Ask a mod to move this thread to the right forum.

It looks to me that your site was written by a professional. Why have you not requested him to make this change?

ammweb 12-11-2012 02:04 PM

It is using an Iframe, but within the Iframe is an asp page which is what I develop.


All times are GMT +1. The time now is 05:47 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.