code: function (selector, value, physical) {
              try {
                  var jqElem = $(selector);
              } catch (e) {
                  return;
              }
              if (jqElem.length === 0) {
                  return;
              } else if (jqElem.is('input[type="checkbox"]')) {
                  if (value) {
                      jqElem.attr('checked', true);
                  } else {
                      jqElem.removeAttr('checked');
                  }
              } else if (jqElem.prop('value') !== undefined) {
                  if (physical) {
                      jqElem.attr('value', value);
                  } else {
                      jqElem.val(value);
                  }
              } else {
                  jqElem.html(value);
              }
          }
docs: set a field value in accordance to the field type