Tim

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Redirect To Thank You Page After RSVP #1341242
    Tim
    Participant

    Thank you very much!

    Tim
    Participant

    Thanks a lot for the help!

    Tim
    Participant

    ** Only thing I am worried about with the above code is potential updates that would overwrite it as I just have that code stuffed inside the generate_tickets function.

    Tim
    Participant

    Thanks for the reply!

    How does the generate_tickets() function get called? I see that the RSVP form has a blank action field so the form should just call itself correct? Or does the RSVP under the Tribe directory call the rsvp.php in the view directory.

    So essentially what I would need to do is to post the correct variables and then call generate_tickets() which would then trigger the creation of a new attendee?

    I think I did solve the problem with the code below (just manually added in the mapping for the ACF fields upon attendee creation), but I would like to know what you mean for future reference as well!

    `// Collect Form Info
    $first_name[‘value’] = empty($_POST[‘first-name’]) ? ” : $_POST[‘first-name’];
    $last_name[‘value’] = empty($_POST[‘last-name’]) ? ” : $_POST[‘last-name’];
    $gender[‘value’] = empty($_POST[‘menu-808’]) ? ” : $_POST[‘menu-808’];
    $dob[‘value’] = empty($_POST[‘date-300’]) ? ” : $_POST[‘date-300’];

    inserts post

    // Assign ACF Keys Info
    $first_name[‘key’] = “first_name”;
    $last_name[‘key’] = “last_name”;
    $gender[‘key’] = “gender”;
    $dob[‘key’] = “date_of_birth”;

    // Update Fields
    update_field( $first_name[‘key’], $first_name[‘value’], $attendee_id );
    update_field( $last_name[‘key’], $last_name[‘value’], $attendee_id );
    update_field( $gender[‘key’], $gender[‘value’], $attendee_id );
    update_field( $dob[‘key’], $dob[‘value’], $attendee_id );

Viewing 4 posts - 1 through 4 (of 4 total)