Is there a way to hide unchecked checkboxes from a multi-relational field?

Hello,

I have a multi-relational field that I'm displaying as checkboxes.

If I select 2 out of 4 in a transition only those two will display on the State form.

If I use another transition to update the field all four checkboxes will show. I only want the two that are selected to show similar to the way its displaying on the state form.

Is there some javascript that will enable me to do this?

Regards,

Will
Parents
  • This worked for unchecking the multi-relational field. I removed the javascript from the field action within the field and placed it into a javascript file within the forms javascripts dropdown property. I was not able to set a breakpoint when the javascript was within the field action.



    if (transition_value_var == "DESKTOP_ENVIRONMENT.REMOVE")
    {

    if (GetFieldWidgetByName) {
    var x = $(GetFieldWidgetByName("REJECTED_LOWER_ENVIRONMENT")).find(":checkbox(:checked)"); for (i = 0; i
    {
    var y = x.checked
    var z = x.value // Do I even need z in this code....?
    if ( y == true )
    {
    $(":[value='" x.value "']").attr("checked",false); }
    else
    {
    $(":[value='" x.value "']").hide(); //Makes the checked items read only.
    }
    }
    }
    }
Reply
  • This worked for unchecking the multi-relational field. I removed the javascript from the field action within the field and placed it into a javascript file within the forms javascripts dropdown property. I was not able to set a breakpoint when the javascript was within the field action.



    if (transition_value_var == "DESKTOP_ENVIRONMENT.REMOVE")
    {

    if (GetFieldWidgetByName) {
    var x = $(GetFieldWidgetByName("REJECTED_LOWER_ENVIRONMENT")).find(":checkbox(:checked)"); for (i = 0; i
    {
    var y = x.checked
    var z = x.value // Do I even need z in this code....?
    if ( y == true )
    {
    $(":[value='" x.value "']").attr("checked",false); }
    else
    {
    $(":[value='" x.value "']").hide(); //Makes the checked items read only.
    }
    }
    }
    }
Children
No Data