Hi Francesco,<br><br>Thanks for your time and the reply. As far as i know, i can refer to a cck field ( in computed field) as $node-&gt;field_data[0][&#39;value&#39;]; but i am also wondering how to refer a cck field in node body with php input. according to the suggestion given by &quot;Marcus&quot; (<a href="http://drupal.org/node/466694">http://drupal.org/node/466694</a>), i am trying to use some php code to hide and display a cck field in node body.<br>
<br>Beside this, here is the code i have used for computed field to display and hide a cck field.<br><br>$content1 = $node-&gt;field_data1[0][&#39;value&#39;];<br>$content2 = $node-&gt;field_data2[0][&#39;value&#39;];<br>
$t=getdate();<br>$today=date(&#39;D, m/d/Y - H:s&#39;,$t[0]);<br>$due_date = $node-&gt;field_whatisdate[0][&#39;value&#39;];<br>if ($due_date &gt;= $today){<br>  $node_field[0][&#39;value&#39;] = $content1;<br>}else{<br>  $node_field[0][&#39;value&#39;] =  $content2;<br>
}<br><br><b>Display:</b><br>$display = $node_field_item[&#39;value&#39;];<br><br>This is how i tried but no luck. i still have issues. please check with this. Thanks in advance.<br><br>With regards<br>Mohan<br><br><br><div class="gmail_quote">
On Wed, May 20, 2009 at 4:37 PM, Francesco <span dir="ltr">&lt;<a href="mailto:entuland@gmail.com">entuland@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Mohan,<br>
I&#39;ve read your lines:<br>
<div class="im"><br>
&gt; I&#39;m trying to display/hide a cck field based on the input given in another<br>
&gt; field. My situation is i need to show a cck text field based on the server<br>
&gt; time...if it doesn&#39;t matches, I need to display another cck text field.<br>
<br>
</div>and the thread you mentioned on Dupal.org:<br>
<div class="im"><br>
&gt; You can see my details in forum post here <a href="http://drupal.org/node/466694" target="_blank">http://drupal.org/node/466694</a> .<br>
<br>
</div>So far, I wasn&#39;t able to understand if the logic should be applied at<br>
input time or at render time.<br>
<div class="im"><br>
&gt; I guess i can do this using &quot;Computed fields&quot;. I read and got some clue from<br>
&gt; this post (<a href="http://drupal.org/node/182473" target="_blank">http://drupal.org/node/182473</a> ) but yet i couldnt get this done .<br>
<br>
</div>Maybe computed fields could make it for input time, but in any case it<br>
could be useful if you explain in deeper detail the steps you&#39;ve<br>
already done and report the PHP you&#39;re using, so that others can<br>
reproduce it and check out what&#39;s not working.<br>
<br>
If you have to apply the logic only at render time you can achieve it<br>
with Contemplates quite easily.<br>
<br>
Hope this helps,<br>
regards,<br>
Francesco<br>
<font color="#888888">--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</font></blockquote></div><br>