Skip to main content

๐Ÿ•น๏ธ Control Hidden Related Event Selectors

This article is a stub.

Control a hidden related event selector via checkboxes:

//Find hidden related event selector options
var $audition_checkbox = $('[data-export="related_event"] input[value *= "April 23"]');
var $workshop_checkbox = $('[data-export="related_event"] input[value *= "April 22"]');

//Attach change handler to workshop event question. Select related events based on prompt value matches
$('[data-export="event"] input').change(function (event) {
ย  ย  if (form.getValueArray('event').includes('audition')) {
ย  ย  ย  ย  $audition_checkbox.prop('checked', true);
ย  ย  }
ย  ย  else {
ย  ย  ย  ย  $audition_checkbox.prop('checked', false);
ย  ย  } ย  ย if (form.getValueArray('event').includes('workshop')) {
ย  ย  ย  ย  $workshop_checkbox.prop('checked', true);
ย  ย  }
ย  ย  else {
ย  ย  ย  ย  $workshop_checkbox.prop('checked', false);
ย  ย  }
});