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

Open
wants to merge 1 commit into
base: staging
from

Conversation

Projects
None yet
2 participants
@karser
Copy link

commented May 10, 2019

Q A
Bug fix? Yes
New feature?
MauticBox url https://mautibox.com/7510/page/preview/4#
Related user documentation PR URL mautic/documentation#305
Related developer documentation PR URL
Issues addressed (#s or URLs)
BC breaks?
Deprecations?

Description:

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 element=.call-to-action-btn} <!-- 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

@karser

This comment has been minimized.

Copy link
Author

commented May 17, 2019

I added the same changes to getFormLink (as in #7534) and reproduced environment in MauticBox https://mautibox.com/7510/page/preview/4 - 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.