Group Registration and Attendance for Sign-Ups

Now that you’re familiar with projects and opportunities, let’s change the scenario from what we saw at the start of this chapter. In this section we’ll cover how to use sign-ups for groups and how to take attendance for sign-up events.

Group Registration

As we saw in the prior section, the Sign-Up Register block has three modes. When it’s set to Group mode then people can be signed up from an existing group. This takes a few steps to set up, but we’ll walk you through it.

First, we need to talk about Id Keys. The Sign-Up Register block needs to know what you’re signing up for. It needs to know the project, the location and the schedule. Normally we would pass in the Id’s for those entities from the URL. But with sign-ups, we’re going to need the IdKey instead of the Id. The IdKey is an alphanumeric string of characters that represents the Id. For instance, an entity with an Id of 4 has an IdKey of “da0BJvBpzX”.

You’re going to need a new page to house the Sign-Up Register block set to Group mode. As you’re setting this page up give it a route with parameters. The easiest way is to copy the route from the sign-ups registration page that ships with Rock, change the route names, and add a parameter for GroupId. The route for your registration page might look like:

signup-group/{ProjectId}/location/{LocationId}/schedule/
{ScheduleId}/group/{GroupId}

Then, all you need to do is use Lava to generate the IdKey for each entity. There is a property on each of these entities called "IdKey" and you'll need to use Lava to access it. If you want to find the IdKey for a group, you might use Lava like the below:

{% group Id:113 %}
{% endgroup %}

    {{ group.IdKey }}

Note that the ProjectId is the IdKey for the sign-up group. In the end your URL would look like:

yourchurch.org/signup-group/7QVlZ89BZW/location/KewldO1moa/schedule/
Dx9l4aPaEX/group/7oWlzzdljq

Anyone who is in the group can use this link to register themselves or others for the given project.

Taking Attendance

Taking attendance for a sign-up group works similarly to the Group Registration process described above. You’ll need to build a URL, and then that URL can be used to take attendance.

You’ll need a page with the Sign-Up Attendance Detail block. Rock ships with one under the route of signups/attendance. Instead of the GroupId, we’ll be passing in the Attendance Date. So, your URL will look like:

signups/attendance/{ProjectId}/location/{LocationId}/
schedule/{ScheduleId}/attendancedate/{AttendanceDate}

The Send Attendance Reminder job uses the Group Attendance Reminder system communication. But you’ll have to set up the link in that email to look something like this:

{% capture attendanceLink %}
    {{ 'Global' | Attribute:'PublicApplicationRoot' }}signup/attendance/{ProjectId}/location/{LocationId}/schedule/{ScheduleId}?AttendanceDate={{ Occurrence | Date:'yyyy-MM-dd' | EscapeDataString }}
{% endcapture %}

Note the date formatting above. If you’re building a link directly to the page, the date should be formatted in that way:

yourchurch.com/signups/attendance/7QVlZ89BZW/
location/KewldO1moa/schedule/Dx9l4aPaEX/attendancedate/2023-08-26

Once you arrive at the page all you need to do is mark who is present and save.