Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow using classes in {mauticform element=button-selector} #7510

wants to merge 1 commit into
base: staging


None yet
2 participants
Copy link

commented May 10, 2019

Bug fix? Yes
New feature?
MauticBox url
Related user documentation PR URL mautic/documentation#305
Related developer documentation PR URL
Issues addressed (#s or URLs)
BC breaks?


This PR allowed using selectors which point to multiple elements in {mauticform} token.

Before (supported only single element link):
<a class="btn btn-default" href="#" id="call-to-action-one">Click me</a> <!-- trigger button -->
{mauticform id=2 style=modal element=#call-to-action-one} <!-- setup modal form -->

<a class="btn btn-default" href="#" id="call-to-action-two">Click me</a> <!-- trigger button -->
{mauticform id=2 style=modal element=#call-to-action-two} <!-- setup modal form -->
After (classes along with multiple elements can be used):
<a class="btn btn-default call-to-action-btn" href="#">Click me</a> <!-- trigger button -->
<a class="btn btn-default call-to-action-btn" href="#">Click me</a> <!-- trigger button -->

{mauticform id=2 style=modal} <!-- setup modal form -->

Steps to test this PR:

  1. Load up this PR
  2. Put a form snippet on a Landing Page, e.g {form=2}
  3. Make sure that Before(selecting one button by id) and After (selecting multiple buttons by classes) cases work.

@karser karser force-pushed the karser:form-js-fixes branch from 0693ee5 to 48984eb May 17, 2019


This comment has been minimized.

Copy link

commented May 17, 2019

I added the same changes to getFormLink (as in #7534) and reproduced environment in MauticBox - everything works as expected
@npracht @kuzmany is there a change to merge this PR to 2.15.2 along with #7534?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.