Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Change title on form when editing record?

Glen Collins
Contributor
September 22, 2021

Hello all. I'd like to know if it's possible to change the title of the modal form for editing. I've been trying to play around with javascript to trigger the title change when the edit function is selected for the record, but I have been unsuccessful in my attempts to change the title of the form.

I'm able to get an alert box to show when I click and select edit. This is the simple javascript I tried:

<script type="text/javascript">

$(document).on('click', '[id^="i_confiform_edit_button_"]', function() {
   recordEdited = true;
   alert(recordEdited);
});

function changeTitle() {
   if (recordEdited ) {
    alert(recordEdited);
    document.getElementById("dialog-title").textContent = 'Change title to this' ;
   }
}

</script>

As a test I have a alert box pop up and it does, so I know that portion is working. I tried to add the title change as just part of the edit function on-click trigger but I'm not sure if that resource is available (windows not drawn yet) at that time to actually change it.

I then tried to put an onload inside the form definition but I'm not sure if that's even supported. It failed anyways. I just want to be able to have the user see the change during the add of a new record and an edit.

Possible?

Thanks.

Glen

 

1 answer

0 votes
Alex Medved _ConfiForms_
Community Champion
September 27, 2021

That is much more simple - you can have a rule or multiple rules like this defined https://wiki.vertuna.com/display/CONFIFORMS/ConfiForms+Field+Definition+Rules#ConfiFormsFieldDefinitionRules-Setformtitle

Changing your form's title when you want (on a condition you specify)

Alex

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events