• Resolved massa09

    (@massa09)


    Hello guys!
    I am trying to append URL parameters from the attendee’s informations when a user buy an event ticket so that I can prepopulate the same infos in the billing fiels on the checkout page.

    In this case, the value of the input “First Name” should then be added to the URL after the user click the submit button.
    The user would then be taken to https://website.com/checkout?firstname=John

    This is my attempt at creating this with JS:

    setTimeout(function() {
    
    const form = document.getElementById('tribe-tickets__registration-form');
    
    form.addEventListener('submit', function(event) {
    const firstName = document.getElementById('tribe-tickets_29226_first-name_{{data.attendee_id}}').value;
    const actionUrl = form.action;
    const newUrl = ${actionUrl}?firstName=${firstName};
    
    form.action = newUrl;
    });
    
    }, 5000);


    I added the Timeout so the registration form has the time to completely load first.
    Note: I’m using event ticket and event ticket plus as well as WooCommerce Checkout Field Editor
    I had no luck making this work. Anyone has some insight?

    Thank you !

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support iammarta

    (@iammarta)

    Hi @massa09 ,

    Thanks for reaching out!

    This forum is for Free products only so we are not able to proceed with support for paid products here.

    Please submit a ticket here:?https://theeventscalendar.com/support
    One of our agents will get back in touch with you on this.

    Best regards,
    Mart

    Plugin Support Darian

    (@d0153)

    Hi @massa09

    This thread has been inactive for a while, so we’ll go ahead and mark it Resolved. Please open a new thread if any other questions arise, and we’d be happy to help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘URL parameters added from attendee’s informations?’ is closed to new replies.