I’m building a Webflow collection in which I want to embed a ReactJS app; the app renders a complex form. The form must be displayed on every collection page and its inclusion is essential to meet my project’s requirements
I see that I can embed references to my compiled code within the <head> and <body> elements of standard Webflow pages, but I don’t see an API for doing the same thing on collection pages.
How can I get my React scripts into the <head> and <body> elements of my collection pages so my app will render correctly?
Yes, but code you put on the collection page will be on all collection pages.
If you’re taking the IFRAME approach and want it per-page, then you can;
Add a rich text field to your CMS called e.g. “React iframe”
In it, for each CMS item, add an Embed element within the rich text and add your IFRAME html
Drop a rich text element on your collection page, and bind it.
If you can isolate your differences to just the URL you’re iframeing, like https://app.mysite.com/widgetmaster?id=123, then you could store just the URL in a CMS field, and use the +Add field feature inside of an embed or code area.