Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

change dynamically section label

soukayna
Tera Contributor

hi,

i want to change my section label in a client script after a condition any one knows how to do it ????

2 REPLIES 2

shloke04
Kilo Patron

Hi,



You need to use DOM manipulation for achieving the same.Have implemented a similar functionality for dynamically changing the Container Name based on different choice Value of a Variable. If you want to do this on a form, you can give a try writing an On change Client Script on the field on which you want to change the Value to as per the script below:



Script:



  var x = document.getElementById("Mention Element ID");


  x.querySelector(".form_header").textContent = "New Section Name";



You can also check the below thread and response from Mark on the same:



To change Form Section label dynamically



Hope this helps.Mark the answer as correct/helpful based on impact.



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

hi Shloke Srivastava,


i tried the code u give me but it didn't work , i want actually to change my section label if the condition is true an it didn't work for me


thanks,