       const storageKey = hashStorageKey(element);

          if (!localStorage[storageKey]) {
            localStorage[storageKey] = "{}";
          }

          const inputName = element.attr("name");
          const inputValue = element.val();
          let data = JSON.parse(localStorage[storageKey]);
          if (inputName === "userRoles") {
            // ensure default roles are included
            data[inputName] = [...new Set([...inputValue.trim().split("\n"), ...defaultRoles])];
          } else 