Answered
Question about filtering commas
Sorry for this newbie questions.
I have a simple quetions where people can answer
What flavor ice cream you want? and they can select mutiple ones
<select multiple size="12" name="icecream">
<option value="vanilla" selected>Vanilla
<option value="choco" selected>Choco
<option value="mango" selected>mango
<option value="coffe" selected>coffe
<option value="fudge" selected>fudge
</select>
Now the data get stored as a comma delemeted for example, vanilla,choco,fudge
I need to allow the users to edit their selection if they want to.
So when I query the field from the DB the value comes back as above (comma delemeted).
I can add a CFloop to return each on one line.
Now my question is how can I make let people see what they have selected before and in the form where they can modify their selection. When I add the loop and cfif statment, I get the selections repeated few time.
So I want to have the select stament above with the option SELECTED if the user have chosen that flavor before.
Again I have not programmed in years and very rusty with this.
Any help is appreciated.
I have a simple quetions where people can answer
What flavor ice cream you want? and they can select mutiple ones
<select multiple size="12" name="icecream">
<option value="vanilla" selected>Vanilla
<option value="choco" selected>Choco
<option value="mango" selected>mango
<option value="coffe" selected>coffe
<option value="fudge" selected>fudge
</select>
Now the data get stored as a comma delemeted for example, vanilla,choco,fudge
I need to allow the users to edit their selection if they want to.
So when I query the field from the DB the value comes back as above (comma delemeted).
I can add a CFloop to return each on one line.
Now my question is how can I make let people see what they have selected before and in the form where they can modify their selection. When I add the loop and cfif statment, I get the selections repeated few time.
So I want to have the select stament above with the option SELECTED if the user have chosen that flavor before.
Again I have not programmed in years and very rusty with this.
Any help is appreciated.
