So I only want my users to be able to choose 3 options, before they get a message directing them to the upgrade page.
I have been successful in displaying the message with the link however, the user is unable to click on it. The only way to reach that page is by right clicking and opening in a new tab/window.
Javascript:
$(".js-source-states-2").select2({
maximumSelectionSize: 3,
formatSelectionTooBig: function (limit) {
// Callback
return 'You can only select 3 items (Upgrade to <a target="_blank" href="/charges/new">Premium</a>)';
},
placeholder: "Select Condition(s)"
});
Works as I thought it might:
However the link is un-clickable, even though the cursor changes to allow you to click once you hover above it and the link appears in the bottom left corner of the browser.
Image of output of the above code, however not able to click the link