I have an aux table with 30 values. The values are Install Environments for a release process.
I have a multi-relational field that I connect to the Aux table.
The user selects the values they require on their update form.
At a later point they may choose to install those values that were selected
I can turn off the values that are available to them using the javascript shown below. The display shows the entire aux table values but the javascript will hide the check boxes that are not in the multirelational array.
It's a nice little bit of javascript.
What I would really like it to do is to entirely hide the field value and not just its checkbox. Similar to how the field displays on the State form. It only shows the values that are selected.
Any ideas?
if (GetFieldWidgetByName) {
var x = $(GetFieldWidgetByName("AVAILABLE_LOWER_ENVIRONMEN")).find(":checkbox(':checked')");
var lengthvar = x.length;
for (i = 0; i < x.length; i++)
var y = x[i].checked;
var z = x[i].value;
if ( y == true )
{
$("[value='"+ x[i].value +"']").attr("checked",false); // Makes sure the field is unchecked for available items.
}
else
{
$("[value='"+ x[i].value +"']").hide(); //Makes the checked items read only.
}
}
This is the transition form outuput. It's showing all of the aux table values.
This is the State form Output. I would like the state form output with checkboxes Only shows the selected items.