As previously announced via banners and our newsletters, support is no longer available through this platform.

For easier navigation, you can still click on "Submit a Ticket" here, choose the appropriate category, and you'll be redirected to the correct support channel for your plugin.

You can still access your previous tickets and browse public tickets, but please note that responding to tickets is no longer possible.

Paid customers: Please log in to your store account for support.

Pre-purchase questions: Use the support widget in the bottom-right corner of our websites:
https://wpamelia.com
https://wpdatatables.com
https://wpreportbuilder.com

Okay
  Public Ticket #3600448
Passing Parameter to Shortcode
Closed

Comments

  • Taylor started the conversation

    I'm trying to be able to provide a URL in a newsletter that will take the reader to a page and show a specific event, rather than the entire calendar, requiring them to hunt around for the promoted event.

    I figure the best way to do this is encode the eventid in the URL and then parse it out and pass it to the amelia shortcode.

    Using developer tools, I can get to the .push line from the (in this example)  ameliaeventsbookinglist shortcode and the parameter I want to pass ($amelia_id, assigned in javascript) contains the correct value, however it seems the way I pass it in, it shows up as: 

    ameliaShortcodeData.push(

        {
          'hasApiCall': (typeof hasEventApiCall !== 'undefined') && hasEventApiCall,
          'trigger': '',
          'trigger_type': '',
          'triggered_form': 'elf',
          'in_dialog': '',
          'counter': '1000',
          'employee': '',
          'eventId': '$amelia_id',
          'eventRecurring': 0,
          'eventTag': ""
        }

    as you can see it just passes is as a string, is there anyway to get it out of the quotes other than changing the source?

    or is there another way to pass a URL parameter to the shortcode?

  •  1,718
    Uroš replied

    Hello Taylor,

    Thank you for reaching out to us.

    Unfortunately, there is currently no such option with Amelia's built-in features. You can suggest that feature on the following link: https://features.wpamelia.com/ 

    We carefully follow suggestions from our customers and the more votes the feature gets, the more priority we put on implementing that feature in one of the future updates.

    Kind Regards, 

    Uros Jovanovic
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables