Is there a way to dynamically set the title to the EntryViewer dialog page?
For example, I want [entry.title] to be the title of the EntryViewer dialog instead of the default title set on the Form Definition.
I've tried to add the title field inside the dialog, and the following function to the "Execute Custom Javascript Function after the form is loaded" parameter, but it doesn't seem to work:
function setDialogTitle(formId){ AJS.$(`#${formId} h2#dialog-title`).text(AJS.$(`#${formId} #i_sel_title`).text()); }
Tried to put console.log there as well, and it doesn't seem like it does anything.
Okay, after playing with it, it seems like the Execute Custome Javascript field excepts a function call and not a function name.
I was trying to put "setDialogTitle" there, when I had to put "setDialogTitle(formId)".
It works now
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.