Multiselect list in coldfusion

Discussion in 'Programming' started by khu84, Apr 23, 2009.

  1. #1
    Question may seem very basic!

    how can we handle muti-select box while processing a form....

    i.e. for html select box we just get the value like #attributes.selectName#

    but how will we take values for multiple select List ?
     
    khu84, Apr 23, 2009 IP
  2. cfStarlight

    cfStarlight Peon

    Messages:
    398
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just like you do a single select list: #scope.selectName#. (Though it is usually #form.selectName#)

    Multiple selections are passed as a single comma delimited list. So say you selected three items from a list, on your action page the value might be:

    #form.selectName# = "apples,pears,oranges"
     
    cfStarlight, Apr 23, 2009 IP