back to top

Binding HTML to a Page Elements in Creatio (formerly bpm’online)

I wrote an article previously that covered adding static HTML to labels in Creatio. This article showed some uses of adding static HTML to a page using a label to demonstrate different things you can do with the label control in Creatio. As I mentioned in that article, if you’re wanting to add HTML to a page in Creatio, the best way to do this is to either add it directly to a container, or to use the HtmlControlGenerator custom control type. These methods allow you to bind the content as well (binding to either an object property for the page or to an attribute). Let’s take a look.

First of all, one thing to mention, if you want the bound HTML to be editable, you can simply bind the property containing your HTML to the page, just like you would add any property to a page in the wizards. Then, you edit the page code, locate the item in the diff, and add contentType:4 to the values. This will cause it to be rendered using the same HTML editor that the Notes field uses. You can also add a readonly: true if you want it to not be editable but still display as HTML.

Now, on to adding it to the page yourself without dealing with the size of the HTML editor control. If you want to add the raw HTML to the page, you can add the following to the diff. Note this element will be bound to a property named MyHtmlContent:

{
    "operation": "insert",
    "parentName": "Header",
    "propertyName": "items",
    "name": "HtmlContent",
    "values": {
        "generator": "HtmlControlGeneratorV2.generateHtmlControl",
        "htmlContent": {
            "bindTo": "MyHtmlContent"
        }
    }
}

Additionally, as another approach. You can add HTML directly to a container on a page. With this approach, you have complete flexibility. You can add the container, like this:

{
    "operation": "insert",
    "name": "HtmlContainer",
    "parentName": "Header",
    "propertyName": "items",
    "values": {
        "id": "HtmlContainer",
        "itemType": Terrasoft.ViewItemType.CONTAINER,
        "classes": {
            wrapClassName: ["html-wrapper"]
        },
        items: []
    }
}

We can use that container to generate some HTML and add into that container. To do this, we’ll create a HtmlControl on the fly and render it inside the container we added to the diff in the code above:

var html = this.getMyHtmlContent();
var htmlContainer = this.Ext.get("HtmlContainer");
this.Ext.create("Terrasoft.HtmlControl", {
    id: "htmlControl",
    renderTo: htmlContainer,
    html: html,
    selectors: {
        wrapEl: ".html-wrapper"
    }
});

Of course, as a last resort, you could always just load in the HTML like this as well:

$("#MyPageElement").html(this.getMyHtmlContent());
Contact Customer FX for your CRM project
We let our expertise speak for itself - let us know how our all-star team can help on your CRM project
About the Author
Ryan Farley
Ryan Farleyhttps://customerfx.com/article/author/ryanfarley/
Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix, now Infor CRM, since 2001 and believes in sharing with the community. His new passion for CRM is Creatio, formerly bpm'online. He loves C#, Javascript, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

AI Readiness Checklist for CRM Teams: Is Your CRM System Ready for AI?

Before using AI in Creatio, make sure your CRM data, users, processes, and automation foundation are ready. Use this practical AI readiness checklist for CRM teams.

Build Your Creatio AI Skills with the 2026 AI Summer Program

Join Creatio’s free 2026 AI Summer Program to learn how to identify, build, deploy, and manage AI agents.

Creatio 10x Is Coming: Join the Webinar to Explore the Future of AI-Native CRM

Learn what's new in Creatio 10x and how AI-native CRM, agentic AI, and no-code automation are shaping the future of customer relationship management. Join the upcoming webinar and discover what's next.

Creatio Unlimited Pricing Explained: AI Packages, Costs, Pros & Cons

Learn what Creatio’s new Unlimited pricing model includes, what it doesn’t include, how AI Action packages work, and the pros and cons for businesses evaluating Creatio.

Using the AI Prompt to Create Dynamic Folders in Creatio

Using Creatio's AI prompt to create the filter for a dynamic folder works best if you specifically ask for that, and if you are as clear and direct as possible about the filtering, conditions.

Related Articles

AI Readiness Checklist for CRM Teams: Is Your CRM System Ready for AI?

Before using AI in Creatio, make sure your CRM data, users, processes, and automation foundation are ready. Use this practical AI readiness checklist for CRM teams.

Build Your Creatio AI Skills with the 2026 AI Summer Program

Join Creatio’s free 2026 AI Summer Program to learn how to identify, build, deploy, and manage AI agents.

Creatio 10x Is Coming: Join the Webinar to Explore the Future of AI-Native CRM

Learn what's new in Creatio 10x and how AI-native CRM, agentic AI, and no-code automation are shaping the future of customer relationship management. Join the upcoming webinar and discover what's next.

Creatio Unlimited Pricing Explained: AI Packages, Costs, Pros & Cons

Learn what Creatio’s new Unlimited pricing model includes, what it doesn’t include, how AI Action packages work, and the pros and cons for businesses evaluating Creatio.

Related Videos