GuideBridge: Detect any changes on an Adaptive form on the front-end | Community
Skip to main content
Adobe Employee
September 30, 2021
Solved

GuideBridge: Detect any changes on an Adaptive form on the front-end

  • September 30, 2021
  • 2 replies
  • 1457 views

Hi all,

 

I have a small question regarding the guidebridge API. I want to be able to detect any data changes on the UI of an Adaptive form as users modify the form. I use guideBridge.on("elementValueChanged", callback) which successfully detects data changes, but fails to detect removal of rows in tables. 

 

Is there a general way of detecting any changes on Adaptive forms programmatically (including removal of rows)?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Mayank_Tiwari

Tables rows are managed by instance manager[0]. So, you need to use the same to check for any change in the table.

 

[0]: https://www.adobe.io/experience-manager/reference-materials/6-5/forms/javascript-api/InstanceManager.html

2 replies

Lavanya_Pejjayi
Adobe Employee
Adobe Employee
September 30, 2021

Hello shady-zabady,

 

You can create a rule. based on the event(click, commit, valifdate etc) change you have to write a custom script to add a row to the table or remove a row from the table.

 

for(var i=0; i<numberOfRows; i++){
var tabledata1 = Row1.instanceManager.instances[i].tableName.value;

}

newRow = Row1.instanceManager.addInstance();

 

Below URL gives some more detailed information/operations on the table.

https://experienceleague.adobe.com/docs/experience-manager-65/forms/adaptive-forms-basic-authoring/adaptive-forms-tables.html?lang=en

 

I hope this helps.

Thanks,

 

 

excellentAdobe EmployeeAuthor
Adobe Employee
September 30, 2021

Hi Lavanya,

 

Thank you for the response. I was intending for that approach to be my last resort, since we have a lot of add/remove row buttons. I was hoping there would be some Guidebridge API that allows me to listen on all instanceManagers without resorting to manual rules per each table – much like how "elementValueChanged" allows me to bulk listen on changes without creating any additional rule per each field.

Mayank_Tiwari
Adobe Employee
Mayank_TiwariAdobe EmployeeAccepted solution
Adobe Employee
October 12, 2021

Tables rows are managed by instance manager[0]. So, you need to use the same to check for any change in the table.

 

[0]: https://www.adobe.io/experience-manager/reference-materials/6-5/forms/javascript-api/InstanceManager.html

Level 4
October 6, 2021

Hi @excellent 
You caught my interest, have you made any progress?
To what detail do you need to know about the change? What was deleted or just the fact that something was deleted?
Do you need to know immediately or can we (somehow) check if the table changed after it loses focus?


Cheers M