field as a permission for other field with CCK
i want to have a content type with a phone number field that user can select it be shown to all or not. so i need a field after this field in add content page to give the user this option. but how can i check if user has checked it and then show the phone number in view pa开发者_运维问答ge??
do i need some php coding for it?
You just need to create a custom template for your content type : http://drupal.org/node/17565
Or a custom template for your phone cck field : http://drupal.org/node/62466
In this template you will display phone field depending on the value of the other field, you will need a little bit of php code.
Install Conditional fields, and then set the Make phone number public?
field as the trigger field and Phone number
filed as the dependent field.
So that only if the first field is set to yes, phone number will be displayed.
精彩评论