I'm looking for an object that contains the form field ids or something similar.
Something similar to the _spPageContextInfo object for form fields.
Anyone have an idea?
EDIT: This code I'm using now is this:
function SiteRequestInitNewform() {
document.querySelectorAll('input[title="Title Required Field"]')[0].setAttribute('onblur', 'if (document.querySelectorAll(\'input[title="URL Name Required Field"]\')[0].value == ""){ document.querySelectorAll(\'input[title="URL Name Required Field"]\')[0].value = document.querySelectorAll(\'input[title="Title Required Field"]\')[0].value.replace(/[^a-zA-Z0-9]/g, "-"); }');
}
_spBodyOnLoadFunctionNames.push("SiteRequestInitNewform");
But I'd like to have a fixed ID to get the field, the title attribute changes to easily.
Not to mention that this function is not supported < ie8