Modal Designer problems

No matter how I try, I can’t get this to trigger.

I have followed the instructions and searched the forum for answers, but there’s no explanation on how to do it. Lots of people asking, but no solution. I emailed the creator but got nothing back, and considering he took my money, this is disappointing. I can generally figure these things out - eventually, but this one has defeated me.

Is your project set to Bootstrap 5?

I running the latest version of Blocs, so I presume so.

Maybe start by double checking that first. It’s in a project settings.

It is.

I think the problem is here

  1. Next, add the following 2 data-attributes to your button or link.

data-bs-target=“#your-modal-id
data-bs-toggle=“modal”

Desipte trying several times I can’t get them to stick.

Those attributes are correct.

Care to screen shot how you have added it.

I know they are correct, but when I enter them and save that is the last I see of them. Give me a couple of mins and I will send a screenshot

1 Like

data-bs-target should go into the Name field, while #your-modal-id should go into value.

As I suspected, the way you enter it is important, as above.

Also don’t forget to change the value to match the name of your modal, but keep the #

Thank you, I understand now, but why don’t the instructions say that?

Usually attributes and values are written like that, because it’s how you would add it to the markup.

data-bs-target="#modal-id"

Blocs Custom Attribute separates them into input fields.

Attribute Name
data-bs-target
Value
#modal-ID

I can’t comment on the Bric instructions, I have never seen them. I do have the Bric though.

I’m sure that there is a good reason that hooking up this bric has to be so complicated. The built-in one is limited but works like a dream, and for newbies like me is easy to make work.

Forgive the rant, but people who have a vast knowledge of such things often forget how difficult it is for people like me with no talent for such things to understand.

Anyway, thank you both for the help. It’s still not working, but I will get there. Trial & error.

1 Like

The ID of the modal and the ID in the data-bs-target have to be the same

What you set here is the ID

Screenshot 2023-02-17 at 10.09.09 PM

So in this example…

Attribute Name
data-bs-target
Value
#on-sale

And then you add another attribute

Attribute Name
data-bs-toggle
Value
modal

We got there. Thank you, but boy was that a struggle.

1 Like

Just a way of thinking. You get used to it over time.

Obviously the built in Modal has an advantage over Brics. When we make them, we have to work within the API. But thats getting better.

I’ll make a button that opens the modals. It’ll have style options and global swatch support. …and will be free for owners of Modal Designer.

5 Likes

That’s awesome!! Great idea thank you!

That would have saved me hours trying to work it out. Great idea. Thank You.

2 Likes