In recent weeks, there’s been a lot of discussion on Rocket Chat about customizing Rock’s Signups system and accessing specific fields. This guide provides a set of repeatable examples to help simplify those tasks. Many individuals contributed information that led to making this recipe. Hopefully, this helps someone else.

Setting the Sign-Up Register Page Title

To set the page title on the Sign-Up Register page to “Project Name – Opportunity Name,” you can use the code below inside an HTML Content block placed on the page. I usually add this above the “Sign-Up Register” block.

HTML block placement

Inside the block, paste this code:

{% assign projectKey = PageParameter.ProjectId %}
{% assign projectId = projectKey | FromIdHash %}
{% assign project = projectId | GroupById %}
{% assign scheduleKey = PageParameter.ScheduleId %}
{% assign scheduleId = scheduleKey | FromIdHash %}
{% assign locationKey = PageParameter.LocationId %}
{% assign locationId = locationKey | FromIdHash %}
{% sql %}
    SELECT TOP 1
        glsc.ConfigurationName
    FROM [GroupLocationScheduleConfig] glsc
    INNER JOIN [GroupLocation] gl
        ON glsc.GroupLocationId = gl.Id
    WHERE gl.[GroupId] = {{ projectId }}
      AND gl.[LocationId] = {{ locationId }}
      AND glsc.[ScheduleId] = {{ scheduleId }}
{% endsql %}
{% assign opportunityName = '' %}
{% for row in results %}
    {% assign opportunityName = row.ConfigurationName %}
{% endfor %}
{% capture myTitle %}    {{ opportunityName }} Sign-Up{% endcapture %}
{{ myTitle | SetPageTitle }}

 You will also need to enable the SQL Lava command on the HTML block.

    Once you refresh your page, you should see the page titled correctly, as shown below.

oppname.png

If you want the page titled with only the “Project Name,” replace "{{ opportunityName }} Sign-Up" with "{{ project.Name }} Sign-Up"

Adding Additional Confirmation Text to the Sign-Up Register Page

AddConfirmationText2.png

We also wanted to add some clarification text so users clearly understand what they’re signing up for. Insert the code below into the same HTML Content block, directly after the {{ myTitle | SetPageTitle }} line. Be sure to enable the Rock Entity Lava command.

    You are signing up for
    {% if opportunityName != '' %}
        the {{ project.Name }} - {{ opportunityName }}
    {% else %}
        the {{ project.Name }}
    {% endif %}
    on {% schedule id:'{{ scheduleId }}' %} 
        {{ schedule.NextStartDateTime | Date:'MMMM d, h:mm tt' }}
    {% endschedule %}

Changing the Opportunities to Display in a Table Format

We also decided to display opportunities in a table format and give more visual emphasis to the Opportunity Name rather than the Project Name. Below is sample code to help you get started in that direction. This example code was created with AI and should be placed in the “Results Lava Template” of the “Sign-ups Finder” block.

grid_sign_ups.png

{% assign pid = PageParameter.ProjectId %}
{% assign pname = PageParameter.ProjectName %}
{% assign filtered = Projects %}
{% if pid and pid != '' %}
  {% assign pid_num = pid | AsInteger %}
  {% if pid_num > 0 %}
    {% assign actualProjectId = pid_num %}
  {% else %}
    {% assign actualProjectId = pid | FromIdHash %}
  {% endif %}
  {% if actualProjectId and actualProjectId != '' and actualProjectId != 0 %}
    {% assign filtered = filtered | Where:'GroupId', actualProjectId %}
  {% endif %}
{% elseif pname and pname != '' %}
  {% assign filtered = filtered | Where:'Name', pname %}
{% endif %}
{% assign projectCount = filtered | Size %}
{% if projectCount > 0 %}
    <div class="table-responsive">
        <table class="table table-hover">
            <thead>
                <tr>
                    <th style="width:40%;">Opportunity</th>
                    <th style="width:20%;">Schedule</th>
                    <th style="width:10%;">Spots</th>
                    <th style="width:10%;">Distance</th>
                    <th style="width:20%;"></th>
                </tr>
            </thead>
            <tbody>
                {% for project in filtered %}
                    <tr>
                        <td>
                            <strong>{{ project.ScheduleName }}</strong>
                            {% if project.Name and project.Name != empty %}
                                <div class="text-muted">
                                    <small>{{ project.Name }}</small>
                                </div>
                            {% endif %}
                            {% if project.Description and project.Description != empty %}
                                <div>
                                    <small>{{ project.Description }}</small>
                                </div>
                            {% endif %}
                            {% if project.MapCenter and project.MapCenter != empty %}
                                <div class="mt-2">
                                    {[ googlestaticmap center:'{{ project.MapCenter }}' zoom:'15' ]}
                                    {[ endgooglestaticmap ]}
                                </div>
                            {% endif %}
                        </td>
                        <td>
                            {% if project.FriendlySchedule and project.FriendlySchedule != empty %}
                                {{ project.FriendlySchedule }}
                            {% endif %}
                        </td>
                        <td>
                            {% if project.AvailableSpots != null %}
                                <span class="badge badge-info">{{ project.AvailableSpots }}</span>
                            {% else %}
                                &nbsp;
                            {% endif %}
                        </td>
                        <td>
                            {% if project.DistanceInMiles != null %}
                                {{ project.DistanceInMiles | Format:'0.0' }} miles
                            {% else %}
                                &nbsp;
                            {% endif %}
                        </td>
                        <td class="text-right">
                            {% if project.ShowRegisterButton %}
                                <a href="{{ project.RegisterPageUrl }}" class="btn btn-primary btn-xs">Register</a>
                            {% endif %}
                            <a href="{{ project.ProjectDetailPageUrl }}" class="btn btn-link btn-xs">Details</a>
                        </td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
{% else %}
    <div class="text-center text-muted" style="padding: 2rem 0;">
        <em>No projects found.</em>
    </div>
{% endif %}