How to auto populate text field from number of checkboxes?
hello there,
i newbie in livecycle, , need populate text field checkboxes. there many checkboxes in form , depending on checkbox check, caption of checkbox should copied text field.
i populate 1 checkbox in 1 text field, when more 1 checkboxes checked, caption should added text field , when uncheck should removed text field well, how can that??
for example
cb1: product list
cb2: test cert
cb3: qa cert etc.
if check cb1 , cb3 should auto populate in 1 text field "product list, qa cert"
would appreciate on this.
thank you
-nisarg
hi nisarg,
if checkboxes under subform called 'checkboxes', use javascript following in calculate event of text field.
var result = [];
// select checkboxes children of subform called 'checkboxes' need change bit
var checkboxes = checkboxes.resolvenodes('#field.[ui.oneofchild.classname == "checkbutton"]');
for (var = 0; < checkboxes.length; i++) {
var checkbox = checkboxes.item(i);
// if checkbox selected store in result array
if (checkbox.rawvalue == checkbox.items.nodes.item(0).value) {
result.push(checkbox.caption.value.text.value)
}
}
result.join(", ");
here's sample used check syntax, https://sites.google.com/site/livecycledesignercookbooks/home/shahnisarg28.pdf?attredirect s=0&d=1
regards
bruce
More discussions in LiveCycle Designer
adobe
Comments
Post a Comment