Skip to content

Instantly share code, notes, and snippets.

@be-mohand
Created November 25, 2019 06:49
Show Gist options
  • Save be-mohand/ff66d2dd017d1463bfdbdbbdbd532b6d to your computer and use it in GitHub Desktop.
Save be-mohand/ff66d2dd017d1463bfdbdbbdbd532b6d to your computer and use it in GitHub Desktop.
Update the TOS label depending on the selected user group in the signup form
$(document).on('change', 'form#signupForm #userTypeID', function(e) {
var elem = $(this);
if(elem.val() === "group_id_1") {
tos_label = 'TOS group 1';
} else {
tos_label = 'TOS group 2';
}
$('#tosLabelMessage').empty().text(tos_label);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment