Keep form fields from being editable
You could add a disable tag in your input if the user is not logged in. For example: <input type="text" name="lname" disabled>
I have a form that's pre-populated with values from a database.  If a user is logged in and has sufficient permissions, the user can edit the fields.  That all works well; however, if the user is not logged in, the fields should not be able to be changed.  I have it so that any changes the bad user makes won't save to the database, but I'd like to make it so that the user can't even click into those fields.  
Is there a way to conditionally allow form fields to be clickable?