Problem with combo class and element triggers

Im trying to make a element trigger, it seems it can only work with the 1st class, not the secondary.

my problem is i have 2 elements with classes called form, so my element trigger is affecting both, even tho both of them have a different secondary class.

I guess how do i change the 1st class without affecting the other, whenever i try to change one form to form2 for example the other one changes to form2.

is there a way around this? or is there a way to target secondary classes with element triggers?

Hey @hogarth_heathan, if I am understanding your problem correctly, this trick by @vincent should be the solution.

Affect any element with a combo class

Basically, you have to create a dummy div adding the second part of your combo class (i.e. .button .red is your combo class. .red is the second part. This activates .red within webflow allowing you to target this class specifically with interactions.

Let me know, if this helps and how you’re getting on.

i guess theres no way around while trying to avoid having extra code, ill just have to restyle the class after renaming it. Thanks for the response, awesome link with good info.

1 Like

You‘re welcome! There should be no extra code, if I followed the instructions correctly. You can delete the div after „activating“ the combo class.

If you can share the read-only link to your project, I might be able to help you further.

Rather don’t delete the div. But stock it on a utility page under a password.
If you delete the div, I’m afraid there’s a risk that the class gets cleaned up when you perform a class cleanup. In this exact case, it could maybe not happen, but I haven’t tested it preperly.