Use a hidden field and custom JavaScript to identify the first registrant in a group registration block as the primary registrant. After the form stores that value, you can use conditional logic to show different content, payment amounts, gift options, or instructions to the primary registrant and additional guests.
📝 Note
This article uses custom JavaScript. Test the behavior in a test environment before adding it to a production form. Update the script if your form page ID differs from the example.
⭐ Get Inspired
This article was adapted from a post by Technolutions staff in the Slate Community Forums' Get Inspired space. Have a great idea for a Get Inspired post? Let us know!
Watch a video
Try a Slate example 💼
Copy this Suitcase ID and paste it in Database → Suitcase Import to import an example configuration:
5085a369-94e1-436c-bba9-07876af2f190:slate-advancement-showcaseConfiguring the primary field
Go to the form that contains the group registration block.
Add a field inside the registration block to store whether the registrant is primary.
Configure the field with a Data Type of Real.
Use
primaryas the field export key.Hide the field if registrants should not see or edit it.

Adding the script
In the form editor, select Edit Scripts and Styles.
Select the Custom Scripts tab.
Add the following script.
$(function() {
function setPrimary() {
// Clear the value of all primary inputs first.
$("[data-export='primary'] input").val("");
// Set the first registration block primary input to 1.
$("tbody.replicate_destination").first()
.find("[data-export='primary'] input")
.val("1")
.triggerHandler("change");
}
setTimeout(setPrimary, 50);
var observer = new MutationObserver(setPrimary);
var config = { childList: true, subtree: true };
observer.observe(document.getElementById('form_page_2'), config);
});The example observes form_page_2. If the registration block is on another page, replace that value with the page ID from your form.
Using the primary value in conditional logic
The script sets the first registration block to 1 and clears the value for the other registration blocks. Use conditional logic to show objects to the primary registrant or to additional guests.
Showing content for the primary registrant
Use a Numeric Value condition to show the object when the primary field equals 1.

Showing content for additional guests
Use a Form Field Exists condition to show the object when the primary field does not exist or is blank for the registrant.

Testing the registration flow
Preview the form and add multiple registrants.
Confirm that the first registrant receives the primary-only content.
Confirm that additional registrants receive the guest-only content.
Remove and re-add registrants to confirm that the primary value resets correctly.
For more information about registration blocks, see Group Registrations.