1
votes

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 page??

do i need some php coding for it?

2

2 Answers

1
votes

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.

0
votes

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.