Add on click option to start a chat from Creative CTA element

Guys, hope all is well.

Is it possible to add an onclick to a Creative CTA element?

Basically, what I need is to replace the button on the following code to use it for the creative CTA
<button onclick=";;">Chat with us</button><script>window.fcWidget.init({ token: "99198db8-ea46-4f69-a106-4fd0076835b4", host: ""});window.fcWidget.hide();</script>


Hey @jdiaz1302,

There is no way to set the Creative CTA element to use a button tag but you can add the onclick attribute like the screenshot below.


The output would look like this:

<a onclick=";;"> 

Just in case you don’t know yet, you can add your script in the Global JS or Content JS. Just remove the script tags like the screenshot below.


Hope that helps.

Thank you @christian

I didn’t know that feature was available, but the screenshot looks different from mine, so don’t know if I’m using a different version but from here, I don’t see the custom attribute. I’m using X, not Pro.

And just updated to the recent version yesterday. Perhaps I still need to activate something?

Thanks in advance!

Hi jdiaz1302,

The custom attribute feature was introduced in Cornerstone version 4.1.0 so please make sure you update to at least the version so that you’ll be able to see the feature.

Please also note that if you update Cornerstone to the latest version, you also have to update X.

In case you are using the latest version but you are not seeing the options, Please click on the cog icon on the settings area then enable the Advanced Mode option.

Hope this helps.

Thanks, I have Cornerstone 4.2.2 and I have enabled advanced mode but I don’t see custom attributes :frowning:

Hi @jdiaz1302,

Do you also have X updated to the latest version? And please make sure that you are using the Creative CTA element and not the Classic version because the classic version doesn’t have this option.

If you have checked both of those options, please provide us with the admin access to your site in a Secure Note:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.