I'm trying to use uses a form "choice_remaining" to present users with a list of items (Say a list of cakes for a pot luck)
I've setup a form called sign_up that lets them write their name and using a lookup field pick an item from the list.
As each submit record makes a selection, I want to remove their choice from the list of possibilites. Eventually the lookup would be empty.
All this works well except the selection from the lookup field (input.Selection) is never saved in the sign_up form. The name is saved and the lookup item is removed for the next submit.
Here's the code.
Any ideas??
Thanks
---------------------------------------
form Sign_Up
{
displayname = "Sign Up"
field alignment = left
Name
(
type = text
width = 200px
)
Selection
(
type = picklist
values = Choices_remaining.Choice
width = 206px
)
actions
{
on add
{
Submit
(
type = submit
displayname = "Submit"
on success
{
delete from Choices_remaining[ Choice = input.Selection ];
}
)
Reset
(
type = reset
displayname = "Reset"
)
}