Question T14850
Visible to All Users

Recognize Question Title Input Changes and trigger event

created a year ago (modified a year ago)

Dear Support Team,

I hope this message finds you well. I am currently working with SurveyJS and I am seeking guidance on how to detect changes in question titles within the survey creator mode.

Could you please provide instructions or code snippets to help me achieve this?

Thank you for your assistance.

Warm regards,

Ghanshyam Kote

Answers approved by surveyjs Support

created a year ago

Hello Ghanshyam,
Thank you for reaching out and considering SurveyJS for your business needs. To detect changes in question properties, including titles, handle the creator.onSurveyPropertyValueChanged event.

JavaScript
creator.onPropertyValueChanging.add((sender, options) => { if (options.propertyName === "title") { console.log(options.newValue); } });

Please note that when a user updates a property value within a property grid, the onPropertyValueChanging event is raised when a user types in a new value. If you wish to raise the onPropertyValueChanging event when a user moves the focus out, additionally handle the creator.onPropertyGridSurveyCreated event and set the textUpdateMode to "onBlur" for a property grid survey instance.

JavaScript
creator.onPropertyGridSurveyCreated.add((sender, options) => { options.survey.textUpdateMode = "onBlur"; });

I created the following demo for your reference: View Demo.

Please let me know if you have any further questions.

P.S. We hope you enjoyed the level of service you received. If so, we would love if you could leave your feedback on SurveyJS page at g2.com. As we’re building our business, every review helps build credibility for future customers and your feedback would be greatly appreciated.