You could use the built-in WordPress body class of "logged-in" to target the id's for name and email. Then you could hide them with CSS display:none. The logged-in body class would not be present if the user is not logged in, so the fields would not be hidden.
You would still do as Carl suggests and pre-populate the form fields. They would just be empty when the user is not logged in (and visible) and would be filled (and not visible) when the user is logged in.
Hiding the fields with CSS is not secure: they're still present in the source of the page. But it did not sound like you wanted security, you just wanted to eliminate redundant inputs for logged in users.
Posted 11 years ago on Wednesday August 17, 2011 | Permalink