Drupal 6: Unable to retrieve field's value in view

I'm new to Drupal and I just inherited from a developer a content profile form with several fields (used as registration form). I added a few fields but I can't retrieve their values in a views, while the older ones show up correctly. The following for example prints nothing:

<?php print $fields['field_membership_type'] ?>

Open in new window


In the views, I even set the above filed to be set to "xxxx" if empty, but still nothing gets through.

There are no typos and permissions look right (identical to the old fields), so I'm out of ideas...

Thanks
jiiins2Asked:
Who is Participating?
 
oliverpoldenConnect With a Mentor Commented:
Are you able to give me a log in to have a look?  You may also want to do print_r($fields); or dpm($fields); if you have the devel module installed.

You probably need to do something like: $fields[0]['field_membership_type'];
Note the [0]
0
 
oliverpoldenCommented:
First of all make sure you are editing the correct file and that the output isn't being cached.
Edit the file to put '#' or something identifiable outside the <?php ?> tags.  Clear your cache and check you can see your change. If you can't see your change, then you're probably editing the wrong file. (where is the file you are editing and what is it called?)
That may solve your problem (by clearing the cache).
Next, you will need to edit the view to add the extra fields you want.
0
 
jiiins2Author Commented:
Unfortunately i already tried all of the above. I get only my two ## as print out...
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
jiiins2Author Commented:
I did the print_r and it shows the new fields as empty. The old fields are printing out just fine without the [0]. How can I pass you the login safely?
0
 
oliverpoldenCommented:
oliver@e3m.co.uk
0
 
jiiins2Author Commented:
on its way
0
 
jiiins2Author Commented:
Got it:

<?php print $fields['field_membership_type_value']->content ; ?>

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.