• Resolved tjesker

    (@tjesker)


    I would like to store the value of an event date in a variable to use in a JQuery I am writing tp use on the checkout page. Is there some way to do this either from the #_EVENTDATES placeholder or from the underlying PHP?

    If it were in a form field, I could just use something like:

    var start = $(‘#start_date’).val();

    …but the event date is displayed as text – not as an input field.

    Any help pointing me in the right direction would be greatly appreciated!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter tjesker

    (@tjesker)

    Figured it out! Maybe this will help someone else:

    1. Go to Forms Editor and and add an HTML field with a value of:

    <div id="earlybird">
    [events_list]#_EVENTDATES[/events_list]
    </div>

    2. Hide the id=earlybird DIV using CSS

    #earlybird {
    display: none;
     } 

    3. The value of #_EVENTDATES can be accessed in JQuery as:
    var eventDate = $("#earlybird").text();

Viewing 1 replies (of 1 total)
  • The topic ‘How can I get the value of #_EVENTDATES to use in use in JQuery?’ is closed to new replies.