Form Based Activities not rendering with "Apply Propositions" | Community
Skip to main content
Level 2
June 30, 2026
Question

Form Based Activities not rendering with "Apply Propositions"

  • June 30, 2026
  • 3 replies
  • 131 views

A form based activity was created which was available in the network response call but not on my website  when I was using apply propositions . My apply propositions was implemented in the following manner : -
 


To make that available on the website , I have to explicitly add the following custom code

var prop = event.propositions.find(
  p => p.scope === "appinstall-popup-mbox"
);
document.querySelector(
  "#abc-membership > section > div > div"
).innerHTML =
  prop.items[0].data. Content;

 



Is there any optimal way to do it or the reason why a seperate custom code is required.

3 replies

Gokul_Agiwal
Community Advisor
Community Advisor
July 1, 2026

Hi ​@AvaniJa 

A key points from the documentation that explain your behavior:

So in your case, the proposition was successfully returned in the network response, but because it was a form-based activity tied to a custom scope (appinstall-popup-mbox), Web SDK did not know where to place the content on the page.

Your custom code effectively served as the renderer. 

You may be able to avoid custom DOM code by supplying proposition metadata when calling applyPropositions(), for example: 

alloy("applyPropositions", {
propositions: event.propositions,
metadata: {
"appinstall-popup-mbox": {
selector: "#abc-membership > section > div > div",
actionType: "setHtml"
}
}
});

Hope this helps. 

Thank you.

Thanks, Gokul
AvaniJaAuthor
Level 2
July 6, 2026

Hi ​@Gokul_Agiwal ,

The selector and action type was already specified in the apply propositions logic, , so it should work ideally , without custom code .


Let me know if I missed something.
 

 

Level 3
July 21, 2026

Hi ​@AvaniJa,

 

The following configuration will sort out the custom code necessary:

Could you check with the alloy instance.

Check whether the location name from Target UI and Scope name are same.

Check whether the selector is present on the webpage.

Check with Append HTML action type.

AvaniJaAuthor
Level 2
July 22, 2026

Hi ​@PrasanthV ,

Location name from target UI and scope name are same , the selector is present on the web page and we have tried using append HTML also , nothing works .

 

Level 3
July 22, 2026

Hi ​@AvaniJa ,


Have you tried the configuration as shown in the attached image?