HTML5 Data Bindings Support Product Page

Answered

Default value in dynamic select lists

11 years ago D.D.M. van Zelst posted:
I watched the video and tried to create a dynamic select list, now i wonder if it is still possible to have a default value shown, for example:

Select/choose ( = static default value)
value1 (= repeated dynamic values)
value2
value3
etc...

When i add a static value it will also be repeated over with the values from the DB so i wonder if such thing is still possible in this way.

Also now it will always default to the last repeated value/record in the list, no possibilty to choose a default value. Maybe i missed something and if so please tell me how to do.

Thanks.

Official Answer

Replied 11 years ago
Actually this is really easy to do!

Just choose the select control and from the data bindings panel, bind the default value to the select.data.value.

This results in adding an atribute to the select tag data-binding-value="{{default_id}}"

Greetings,
George

Replies

Replied 11 years ago
11 years ago D.D.M. van Zelst replied:
Any idea how to do this?
Replied 11 years ago
11 years ago Adam Reed replied:
Any response to this? I'm trying to figure out the same problem
Replied 11 years ago
11 years ago George Petrov replied:
Actually this is really easy to do!

Just choose the select control and from the data bindings panel, bind the default value to the select.data.value.

This results in adding an atribute to the select tag data-binding-value="{{default_id}}"

Greetings,
George

Reply to this topic