Knack "API & Code" Won't Load Internal Files

I have a custom script I have written that utilizes an SVG Map to display Knack data by modifying the HTML (Text Formula) to adjust based on specific record data. The current issue I’ve run into is that as its own stand-alone .html the SVG Map runs great, but once I pull apart the HTML, CSS, and JavaScript, the map does not run any longer.

What do I need to adjust to allow the SVG Map HTML display to properly process these style rules?

Knack API & Code Entry

Link to Working SVG Map as an HTML (Inspect Element for code)

Text Formula “Display HTML” Field Contents

Hey Michael8,

Not sure if it might help but have you tried lazyloading the js file using the KnackInitAsync function outlined here?

Actually it seems like the css is loading, I just noticed the Text Formula field is stripping half the formatting code away. That’s why it appears nothing is loading, it’s destroying some of the code such as the “g class” in the original.

The original hope was to use the Text Formula field to assemble the changes I need to the map, such as the display text and the highlight color. Another possible solution would be to embed the .html into each record, so long as I have some way I can edit the HTML using data from fields…

It’s a booking app, so the changes need to be darn close to instant…

What would be the best way to work around Knack not processing all of the tags I need in the Text Formula, such as tags?

Hey @Michael8 I feel it’ll be easier to understand the issue and help you better if we can get on a call and you can share the screen and walk me through the process. Shall DM you.