J.TrIDr3ESpPJEs ID: 843ea1 Sept. 5, 2018, 10:34 p.m. No.2899194   🗄️.is 🔗kun

>>2784392

Obsfucation is not security.

 

What's to stop someone opening up the dev window of a web browser and disabling/editing the CSS file?

 

Besides, Q needs access to the name field by default (and personally I would just keep appending my name to the bottom of my posts if the name field was disabled).

 

JavaScript for disabling email:

document.getElementsByName("email")[0].style.display = "none";

 

CSS selector:

input[type="email"]

{

display:none;

}

 

 

You're welcome. Leave the name field in please (maybe just append 'optional' to the name field?).

J.TrIDr3ESpPJEs ID: 843ea1 Sept. 5, 2018, 10:39 p.m. No.2899223   🗄️.is 🔗kun

To specify a placeholder attribute (as we cannot write directly to the label) using JavaScript:

 

document.getElementsByName("name")[0].placeholder = "Optional";

 

Note, both this and the prior code assume there is only one name="email" and name="name" element, and that it's the first element in the list.