Documentation Index

Fetch the complete documentation index at: https://knowledge.technolutions.net/llms.txt

Use this file to discover all available pages before exploring further.

Pre-Populate Related Events

Prev Next

Use custom JavaScript to automatically select one or more options in a Related Event Widget. This setup is useful when an event registration should include required sessions, such as check-in, a welcome session, or a required meeting time.

📝 Note

This article uses custom JavaScript. Test the behavior in a test environment before using it on a live event registration form.

   
       

⭐ 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!

  1. Create or identify the related events that should be selected automatically.

  2. Place those related events in a separate folder when you want to keep required sessions separate from optional sessions.

  3. Add a Related Event Widget to the event registration form.

  4. Configure the widget to display the required-event folder.

  5. Set a clear export key, such as relatedevent1.

Related Event Widget configured with export key relatedevent1 and a selected event folder

Add the auto-select script

  1. From the event, select Edit Scripts/Styles.

  2. Add the script that matches the selection behavior you need.

Select one option

The following script selects the second option in the widget. JavaScript indexes start at 0, so [1] selects the second input.

$('[data-export="relatedevent1"] input')[1].click();

Event registration form with a related event option automatically selected

Select multiple options

Repeat the input selection line for each option that should be selected.

$('[data-export="relatedevent1"] input')[1].click();
$('[data-export="relatedevent1"] input')[3].click();

Related Event Widget with multiple event options selected

Select the first two options when available

var inputs = $('[data-export="relatedevent1"] input');
if (inputs.length >= 2) {
    $(inputs[0]).click();
    $(inputs[1]).click();
}

Select all options

$('[data-export="relatedevent1"] input').each(function(index, element) {
    $(element).click();
});

Considerations

  • Use checkboxes when more than one related event can be selected. Option buttons allow only one selection.

  • If the required related events should not be visible, hide the required-event widget after confirming that the script works.

  • Registrant limits for required related events should not be lower than the registrant limit for the main event.

For more information, see Related Events.

Still looking for what you need?