Skip to content

Instantly share code, notes, and snippets.

@salsalabs
Created July 18, 2017 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save salsalabs/69ff56beb5fd30838567d78cfb45a7d3 to your computer and use it in GitHub Desktop.
Save salsalabs/69ff56beb5fd30838567d78cfb45a7d3 to your computer and use it in GitHub Desktop.
Disable the Email field in Salsa forms.
<script type="text/javascript">
// Script to disable the email address in a Salsa form so that a supporter can view it but not change it.
document.addEventListener("DOMContentLoaded", function () {
var e = document.querySelector('input[name="Email"]');
if (e != null) { e.disabled = true; }
});
</scrip>t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment