We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11920
    • 8 Posts
    Help is appreciated...

    Project: Create an event check-in page for an event where the users are already registered.

    Goal: We will have two computers available at the check-in tables. I want to use WebLoginPE to pull a list of the users who are registered but have not checked in yet. I’d like to have the initial page show a list of the users not checked in with a link/button that says "check-in" if they aren’t checked in. The staff will click on the "check-in" button to mark them as checked in and then the database will automatically be updated to reflect their status.

    Problems: I don’t know how to implement the save button to have it automatically update the checked-in field. I don’t really want a checkbox (which is what I have now). I’d rather have a button or a link. Also, I think that I need to use Ajax so as not to leave the page.

    Here is the snippet that I have so far.

    [!WebLoginPE? &type=`manager`&customFields=`checkedin`&usersList=`The following registrants have not checked in:default:default:internalKey:ASC,checkedin()`&manageTpl=`profiletpl`&manageProfileTpl=`manageprofiletpl` &tableCheck=`1` &inputHandler=`Checked In:checkedin:checkedin:checkbox:()`!]

    The templates:

    profiletpl

    [+wlpe.message+]
    <form class="wlpeManageUsersForm" action="[~[*id*]~]" method="GET">
    <div class="wlpeUserPage">
    <!-- These hidden fields are IMPORTANT! -->
    <input type="hidden" name="internalKey" value="[+view.internalKey+]" />
    <input type="hidden" name="username" value="[+view.username+]" />
    <input type="hidden" name="fullname" value="[+view.fullname+]" />
    <input type="hidden" name="checkedin" value="[+view.checkedin+]" /
    <div class="wlpeUserPageUserContent"">
    <p class="wlpeUserPageAttrUsername" style="white-space:nowrap;"> [+view.fullname+] - [+form.checkedin+] &nbsp;&nbsp; <button type="submit" id="wlpeSaveProfileButton" name="service" value="saveuserprofile">Save</button> &nbsp;&nbsp;<button id="wlpeEditButton" class="wlpeEditButton" name="service" value="editprofile">Edit [+view.username+]</button></p>
    </div>
    </div>
    </form>

    manageprofiletpl

    [+wlpe.message+]
    <div id="wlpeUser">
    <form enctype="multipart/form-data" id="wlpeUserProfileForm" action="[~[*id*]~]" method="POST">
    <fieldset id="wlpeUserProfileInput">
    <div id="wlpeUserInfo">
    <h3 id="wlpeProfileWelcome">Editing the profile of [+view.fullname+] ([+view.fullname+])!</h3>
    <p id="wlpeProfileInfo" class="info">Use this form to edit [+view.fullname+]’s registration information</p>
    </div>

    <legend>[+view.fullname+]’s Registration Profile</legend>

    <!-- These hidden fields are IMPORTANT! -->
    <input type="hidden" name="internalKey" value="[+view.internalKey+]" />
    <input type="hidden" name="username" value="[+view.username+]" />
    <input type="hidden" name="fullname" value="[+view.fullname+]" />
    <label for="wlpeUserProfileFullName">Full Name
    <input id="wlpeUserProfileFullName" type="text" name="fullname" value="[+view.fullname+]" />
    </label>

    <label for="wlpeUserProfileEmail">Email
    <input id="wlpeUserProfileEmail" type="text" name="email" value="[+view.email+]" />
    </label>

    <label for="wlpeUserProfilePhone">Phone number
    <input id="wlpeUserProfilePhone" type="text" name="phone" value="[+view.phone+]" />
    </label>

    <label for="wlpeUserProfileMobile">Mobile number
    <input id="wlpeUserProfileMobile" type="text" name="mobilephone" value="[+view.mobilephone+]" />
    </label>

    <label for="wlpeUserProfileFax">Fax number
    <input id="wlpeUserProfileFax" type="text" name="fax" value="[+view.fax+]" />
    </label>

    <label for="wlpeUserProfileState">State
    <input id="wlpeUserProfileState" type="text" name="state" value="[+view.state+]" />
    </label>

    <label for="wlpeUserProfileZip">Zip Code
    <input id="wlpeUserProfileZip" type="text" name="zip" value="[+view.zip+]" />
    </label>

    [+form.country+]

    [+form.gender+]

    [+form.checkedin+]

    </fieldset>
    <fieldset id="wlpeUserProfileButtons">
    <button type="submit" id="wlpeSaveProfileButton" name="service" value="saveuserprofile">Save</button>
    <button type="submit" id="wlpeProfileDoneButton" name="service" value="cancel">Done</button>
    <button type="submit" id="wlpeProfileDeleteButton" name="service" value="deleteuserprofile">Delete This Attendee</button>
    </fieldset>
    </form>
    </div>