jiiins2
asked on
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:
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
<?php print $fields['field_membership_type'] ?>
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
ASKER
Unfortunately i already tried all of the above. I get only my two ## as print out...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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?
oliver@e3m.co.uk
ASKER
on its way
ASKER
Got it:
<?php print $fields['field_membership_type_value']->content ; ?>
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.