Created
July 18, 2017 16:15
-
-
Save salsalabs/69ff56beb5fd30838567d78cfb45a7d3 to your computer and use it in GitHub Desktop.
Disable the Email field in Salsa forms.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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