Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Paste in the code into the custom HTML element.

Code Block
languagejs
linenumberstrue
<script type="text/javascript">
    $(function(){
       var value = decodeURIComponent("#requestParam.applications#"); //replace with the parameter name you declared in datalist action
       var values = value.split(';');
        $.each( values, function( index, value ){
            if(value != ""){
                $(FormUtil.getField("applications")).find("option[value='" + value + "']").attr('selected', 'selected'); //replace with the field ID of the select box in your form
            }
        });
        //$(FormUtil.getField("applications")).trigger("chosen:updated"); //enable this line if you are using Multi Select Box, replace with the field ID of the select box in your form
    });
</script>