Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

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

Avatar

Level 2

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)?

1 Accepted Solution

Avatar

Correct answer by
Employee

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...

View solution in original post

4 Replies

Avatar

Level 3

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/a...

 

I hope this helps.

Thanks,

 

 

Avatar

Level 2

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.

Avatar

Correct answer by
Employee

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...

Avatar

Level 4

Hi @shady-zabady 
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