How to get csrf token using javascript

OK, I think we’ve isolated the problem to your HTML file. Try putting these at the top.

{% extends "templates/web.html" %}

{% block page_content %}

<script src="/assets/check_in/js/index.js"></script>

<--! your custom form here -->

Thank you so much, that worked! But I would like to remove the header from the tablet as well as the extra margin and padding from the website bundle if possible.

You can unset or hide them in a style block. This is from memory, so it may need adjustment:

.navbar { 
    display: none;
}

.footer { 
    display: none;
}