Expand my Community achievements bar.

SOLVED

drop-down not to appear once selected

Avatar

Level 3

my form is set up to have text appear in a text field once a selection is made from a drop-down list. How do I get the text not appear in the dropdown list field after it is selected dropdown2.jpg

Thanks in advance

1 Accepted Solution

Avatar

Correct answer by
Level 5

Try something like this after your code in the change event of the drop down

for (var i = 0; i < this.items.nodes.length; i++ )

{

    sValue = this.resolveNode("items.#text[" + i + "]").value;

    if ( sValue === xfa.event.newText )

    {

        this.deleteItem( i );

        xfa.event.change = "";

        break;

    }

}

View solution in original post

2 Replies

Avatar

Correct answer by
Level 5

Try something like this after your code in the change event of the drop down

for (var i = 0; i < this.items.nodes.length; i++ )

{

    sValue = this.resolveNode("items.#text[" + i + "]").value;

    if ( sValue === xfa.event.newText )

    {

        this.deleteItem( i );

        xfa.event.change = "";

        break;

    }

}