Form Fields Behavior when binded to same DB field in an Adaptive Form

Avatar

Avatar

Sri_Bhargav_94

Avatar

Sri_Bhargav_94

Sri_Bhargav_94

12-02-2021

Hello Folks,

 

I am a bit confused on how do these Form Fields (when binded to same DB field) work. I have created 2 fragments (let's say Emergency Address and Permanent Address) with FDM and binded properly. These both are actually same in terms of fields and binding, but I just want to bring them up in form as separate sections.

When I am testing  entering data in an textbox (address line) of Emergency Address section, I observed that data is automatically getting populated into textbox (address line) of Permanent Address section. I have no rules written to set value of or something else, but still it is getting changed as and when I try to modify or update.

On deeper investigation, it was found that "fields which are binded to same DB field" are getting same value as input, if you try it either way. This doesn't happen when there is no binding at all (or) if those 2 fields "address line" of each section are binded to different DB fields.

Please correct me if this is expected outcome or If I am doing something wrong.

I don't want to have each field binded to different DB field, instead I am looking at having 2 different form fields bind to same DB field. Provide your suggestions!

 

Regards,

Sri Bhargav

AEM Forms AEM Forms Designer FormsService

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Sri_Bhargav_94

Avatar

Sri_Bhargav_94

Sri_Bhargav_94

15-02-2021

We actually don't need binding for form fields here, since we are not using Submit Action Button, instead we are Invoking FDM services from Rule Editor on a Save / Button by mapping fields to corresponding DB fields.

In this case, it is not getting auto-populated and our requirement is also satisfied

 

Hence closing this thread!

Answers (1)

Answers (1)

Avatar

Avatar

Mayank_Gandhi

Employee

Avatar

Mayank_Gandhi

Employee

Mayank_Gandhi
Employee

18-02-2021

@Sri_Bhargav_94 This is expected if you bind two fields with the same object in the data source.