function submitHero(Id) {
  var elem = $(Id).parents('div[aria-label="section-user-attributes"]');
  validateHero(elem);
  if($(elem).find('.slds-form-element.slds-has-error').length==0){
    if($(elem).find('input[aria-label="attribute-events-flag"]').is(':checked')){
      var products = pickExtraItems(elem);
      buildHeroEvents(elem, products);
    } else {
      elem.parents('.slds-tabs_default__content').find('ul[role="session-row"]').html(sessionOneTemplate.replace('{index}', '1'));
    }
    $(elem).find('.slds-button_brand').addClass('slds-hide');
    $(elem).parents('.slds-tabs_default__content').find('div[aria-label="section-user-sessions"]').removeClass('slds-hide');
    $('#hero-profiles').find('button[role="submit-events"]').removeClass('slds-hide');
  }
}
// Function triggered on button to generate events
Function triggered on button to generate events
Function triggered on button to generate events
function submitHero(Id) {
  var elem = $(Id).parents('div[aria-label="section-user-attributes"]');
  validateHero(elem);
  if($(elem).find('.slds-form-element.slds-has-error').length==0){
    if($(elem).find('input[aria-label="attribute-events-flag"]').is(':checked')){
      var products = pickExtraItems(elem);
      buildHeroEvents(elem, products);
    } else {
      elem.parents('.slds-tabs_default__content').find('ul[role="session-row"]').html(sessionOneTemplate.replace('{index}', '1'));
    }
    $(elem).find('.slds-button_brand').addClass('slds-hide');
    $(elem).parents('.slds-tabs_default__content').find('div[aria-label="section-user-sessions"]').removeClass('slds-hide');
    $('#hero-profiles').find('button[role="submit-events"]').removeClass('slds-hide');
  }
}
function submitHero ( Id ) { var elem = $ ( Id ) . parents ( 'div[aria-label="section-user-attributes"]' ) ; validateHero ( elem ) ; if ( $ ( elem ) . find ( '.slds-form-element.slds-has-error' ) . length == 0 ) { if ( $ ( elem ) . find ( 'input[aria-label="attribute-events-flag"]' ) . is ( ':checked' ) ) { var products = pickExtraItems ( elem ) ; buildHeroEvents ( elem , products ) ; } else { elem . parents ( '.slds-tabs_default__content' ) . find ( 'ul[role="session-row"]' ) . html ( sessionOneTemplate . replace ( '{index}' , '1' ) ) ; } $ ( elem ) . find ( '.slds-button_brand' ) . addClass ( 'slds-hide' ) ; $ ( elem ) . parents ( '.slds-tabs_default__content' ) . find ( 'div[aria-label="section-user-sessions"]' ) . removeClass ( 'slds-hide' ) ; $ ( '#hero-profiles' ) . find ( 'button[role="submit-events"]' ) . removeClass ( 'slds-hide' ) ; } }
Function triggered on button to generate events
Function triggered on button to generate events