Mautic Community Forums

Call focus item via button click

Your software
My Mautic version is: 3.3.2
My PHP version is: 7.4
My Database type and version is: 5.7

Your problem
My problem is: I’m trying to call a Mautic focus item via a button click on a home page (typo3).
Is this possible? How can I call the function via onclick event?

Steps I have tried to fix the problem:
I added the Mautic script:

<button type=“button” class=“btn btn-danger btn-lg” onclick="{mautic type=“focus” id=“2”}">Register

Thanks for your ideas

We had a similar idea just the other day and was not able to call it either, so interested to see if there is a solution here.

My Mautic version is: 3.3.3
My PHP version is: 7.4.19
My Database type and version is: PHP version: 7.3.27

I’m struggling with a similar issue. Basically, a 1 pager WP/Divi site and have an anchor set up as a custom menu item " #page". was thinking the trigger would be https://example/#page.

When to engage set to “upon arrival” at “0 sec”

but no luck so far

Hi @jtourgee are you able to get any pop ups ?

What is the script you using. I have found that the standard script generated is generally missing https at the begining and also index.Php after your base domain

Hey @taxi I am really not sure about how it is called or if I fully understood your reply. If you do get it to work I would be very interested to understand how as well

, I didn’t solve it, just kicked it down the rd for another time and went with static form instead. it would pop up but seemingly only randomly. I was also attempting multiple focus items on the same page for #section1,#section2 etc. they did not work as i’d hoped either. only one focus item would show up and not on the (CSSID#anchored) page jump. no doubt i’v gone beyond my coding paygrade…

1 Like