0

I've created a content type that contains a form. In this form, there is a textfield that i want to make only readable + a specific value on it (if user A is editing this form, he can write on all textfields except this textfield that will contains : user A)

In the other side, I've a custom module that deals with users, so I have users with users ID, usernames..ect the username is the text that I want to automatically set on the content types textfield

I can't show you any code because as I said, it's a content type

Any help is great

2 Answers 2

0

It sounds like you're looking for Field Permissions.

The Field Permissions module allows site administrators to set field-level permissions to edit, view and create fields on any entity.

2
  • This module can make a textfield only readable ?
    – Mitch
    Commented Jul 6, 2015 at 8:51
  • Yes. Do not grant the "Edit" or "Create" permission for the field (only the "View" permission). Commented Jul 6, 2015 at 9:06
0

If this field is only used by modules and its existence doesn't make any change in your user's life , then you can make this field hidden in form . you also can fill its data using rules easily .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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