I have 1 Text field (Check boxes) in a Schema:
Above field have a Custom URL which points to a .NET page.
Values of Check box are each A, B, C.
I want to get and set the value, which is retrieved from the custom URL page.
I confirm to get value, but can't set value to text field (check box).
when setting value, catch below error message.
a.contains is not a function
I confirm to get and set value to simple text field (not check box).
So,I want to set value to text check box field.
I shown below my source code
get value
function getValue() {
var value = "";
var args = window.dialogArguments;
if (args) {
var test = args.container.getField("test");
if (test) {
value = test.getValues();
}
}
}
set value
function setLValue() {
var value = "";
var args = window.dialogArguments;
if (args) {
var test = args.container.getField("test");
if (test) {
try
{
test.setValues([""]);
}
catch (e) {
window.alert(e);
}
}
}
}
setValues
with single-value fields. Since checkboxes are multi-value text fields, maybe try an example from the Tridion "Cookbook":test.setValues(test.getValues().concat("A"))
. Someone else might know better, though.