Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Jun 2008
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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?
    Last edited by ammweb; 12-10-2012 at 07:18 PM.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,037
    Thanks
    203
    Thanked 2,539 Times in 2,517 Posts
    Quote Originally Posted by ammweb View Post
    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?

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #3
    New Coder
    Join Date
    Jun 2008
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?

  • #4
    New Coder
    Join Date
    Jun 2008
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?

  • #5
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,037
    Thanks
    203
    Thanked 2,539 Times in 2,517 Posts
    Quote Originally Posted by ammweb View Post
    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.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #6
    New Coder
    Join Date
    Jun 2008
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!

  • #7
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,037
    Thanks
    203
    Thanked 2,539 Times in 2,517 Posts
    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?
    Last edited by Philip M; 12-11-2012 at 10:36 AM.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #8
    New Coder
    Join Date
    Jun 2008
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It is using an Iframe, but within the Iframe is an asp page which is what I develop.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •