Patrick Kwinten
Patrick Kwinten

Reputation: 2048

get selected value(s) from checkbox group within repeat control

How can I get the selected value from a checkbox group control within a repeat control in SSJS?

I want to check the selected value when the checkbox group is clicked.

The selectable value is something like:"|" + obj.unid

Upvotes: 0

Views: 247

Answers (1)

stwissel
stwissel

Reputation: 20384

Same pattern as every time: Don’t try to read a value from a control. Always use data binding and read the value from the binding. For controls in a repeat an Array or a Map will do the trick. Data binding removes the dependency on control type or name. A request scope or view scope variable should do.

Upvotes: 1

Related Questions