0

i create a views in drupal 6.24.set up some field like username and uid, in third field used customfield php .with my custom php code filled this filed, in another customfield php want use the value of customfield php value ,how can i do it? i know with $data->uid (if userid exist im my views filed) can get current row uid. i test $data->phpcode but return null to me. please tell me about how can i get customfield php in views?

enter image description here

0

You should use the views_php module instead. It is the successor of Views Customfield PHP. The current module you are using does only render content, but has no value. views_php introduce the possibility to define both value and rendering settings. You should then be able to use the generated value in other fields.

1
  • with spend some hour search about this ,finally i use views_module but this module can provide my request, i want determine 5 field, 3 field are php, calucate some value in first and second and i third i want use pervious php field, i use $row->php ,and $row->php_1 but return null to me !!!! – Yuseferi Jun 9 '12 at 9:50
0

the correct way to this is add your desire code in value section ,with return it, and in output section use

<?php
 print $vlaue;
 ?>

with this method we can access all pervious variable in current and next php global field. this descriptions are all about views_php module ;)

i hope this be useful for futures user with this problem,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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