Button with data-market

Hi,

I have a service that is asking me to set a button up with this info:
<button data-id=“s2f-launch” data-market=“me-st-louis” data-api-token=“537|jTUhJTU5pEPUe6lJECmxVGnJRV0gGptiBtBBbGow” >Book Mr. Electric

I can set the ID on a button element and that will launch the script, but I also need to set a “data-market” value in order to add a few different buttons that will launch different scripts.

How can I add the “data-market” value?

Thanks!

Hey Riceman,

Thanks for writing in! In the Button element, find the “Customize” tab and then add the Custom Attribute just like what is shown below:

Hope this helps.

Thanks,

I see how to add this but I can get it to work properly.

I am trying to replicate this:
<button data-id="s2f-launch" data-market="me-st-louis" data-api-token="537|jTUhJTU5pEPUe6lJECmxVGnJRV0gGptiBtBBbGow">Book Mr. Electric</button>

the button code works, and I guess I could just add some css and call it good, but it would be nice to understand how to replicate it with the button element.

here is the mockup, the button sits within the “Book Now” modal, we will be adding a few of these buttons in there:
https://www.neighborlystl.com/book-services-mockup/

I have this added to the button: ( i tried it with/without the ID tag)

Hey Riceman,

The JS script doesn’t seem to allow and work when other elements are inside the button link. To get around this, you can use a nested DIV element and a Text element.

The DIV Anchor element will have the <a> HTML tag and have the custom attributes.

Hope this makes sense.

ah, got it. Thanks so much!

Hi Riceman,

You are most welcome.

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