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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Submit only what shown

    Hi!

    I have a page with 8 different <input type="select"> fields.
    All the time only one out from this 8 is shown. the rest of them are hidden with css: display:none;

    How can I submit with POST only the select that's showing, and not the rest?
    All of them have differnt names. Like dropdown1, dropdown2, and so on...
    I dont know how can I get the value out from the one that's shown, and not the rest.

    Please Help my brain is about to explode...

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,700
    Thanks
    80
    Thanked 4,658 Times in 4,620 Posts
    At the same time you hide a given <select> *also* set it to disabled.

    Disabled fields are not submitted to the next page.

    If you need more help, show some code.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,148
    Thanks
    39
    Thanked 506 Times in 500 Posts

    Arrow

    Quote Originally Posted by tibby View Post
    ...

    Please Help my brain is about to explode...
    When you put your brain back together, post some code.

    You show me yours and I'll show you mine!


  •  

    Posting Permissions

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