Let me explain this. Lets say you have a form that you fill out to create a record.

In order to fill this form out you have to be registered and signed in. Any one can sign up.

This form includes couple peoples addresses and names.

Now any one can go and edit the form where they can see the info on the form.

The problem is that when the form is filled out the first time or edited there is some fields that have personal information and i dont want public to see this data.

Does any one have idea how i can hide the information but have the info available to be updated if needed.

I was thinking using password type but it hides all of it.

Or maybe hiding part of the text ?

I have no idea how to go about this. If any one that reads this has any idea please let me know.

Thanks in advance.


You can use the Field Permissions module to enable create/edit/view permissions per role. So you can remove the view permission on those fields you want to hide for all roles but the admin role. That way authenticated users cannot view or edit the fields but the admin can.

  • The issue is that any one that is registered needs to be able to update a field but they should not see whats in it since it has individuals full name and address. – user2680821 Jan 21 '14 at 16:33
  • I'm a little confused about that comment. Having one field with a full name and address in it may not be a good design although you may have a good reason to do it that way. And then you are saying there is additional information in that field that a user needs to update but not the name and address in that field? If that's the case then you need to create separate fields for name, address, and whatever else you want those users to update. Then hide the name and address fields using Field Permissions. – John81 Jan 23 '14 at 14:22
  • Sorry, let me make my self clear. Lets say i have a form Field1 Field2 Field3 Field3 should not be visible once is filled out because its sensitive information. But should be editable. Only the Admin should be able to view this info. – user2680821 Jan 23 '14 at 14:51
  • In that case I'd recommend writing a custom module and using hook_form_alter. In that custom module check to see if the field is not null and use unset to hide the field if the user role is not an admin. Unset syntax would be unset($form["my_field"]). – John81 Jan 23 '14 at 15:32
  • I know this is confusing, The field needs to be editable but users cant see whats in the field. – user2680821 Jan 23 '14 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.