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

    Exclamation Linking Select Options to Hidden Recipient Fields

    HI,

    I am using a FormMail script but want the form to have a drop down and dependant on the choice of the dropdown a different receipient value will be used in the hidden field which tells the perl script where to send the form results.

    Hope that is clear.

    I have been trying to index the form and then use document.write to input the correct line of html dependant on the select option. This is not working.

    Can anyone suggtest a method that will do this.

    Thanks.

  • #2
    Regular Coder
    Join Date
    Oct 2004
    Posts
    256
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [potential silly question]

    Why are you using hidden fields? Why not simply use the value attribute of the drop-down to store the recipient info?

    [/potential silly question]


    To do it with hidden fields, you could number the options in the drop-down 1, 2, 3 .... etc.

    Then your corresponding hidden fields have id 1, 2, 3 ... etc.

    Your perl script simply needs to look at the value returned from the drop-down and then pick the recipient value from the hidden field with the corresponding id.


  •  

    Posting Permissions

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