Changing Label Text at Runtime

Along the same lines as showing/hiding form fields and labels at runtime, it is often useful to change the text of field labels based on other events. This is an easy enough task which isn’t really all that different than showing or hiding the label.

You just get a reference to the td cell containing the label, which we talked about before is named the same as the schema name ending in an ‘_c’ suffix, and set the inner text for the cell. Here’s a sample for a field with the schema name “new_myfield”.

crmForm.all.new_myfield_c.innerText = 'My New Label';

 

Make’s it easy to change labels if needed to match things that are happening on the form. This could also be used to hide labels altogether as well.

ABOUT THE AUTHOR

Ryan Farley

Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix, now Infor CRM, since 2001 and believes in sharing with the community. His new passion for CRM is Creatio, formerly bpm'online. He loves C#, Javascript, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

1 Comment

  1. Thank you Pankaj, this is working good. (all other way, disconnect the CRM object linked with the page)

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!

You have Successfully Subscribed!