By mohanrajthangarasu on
Hi all,
I'm trying to display/hide a cck field based on the input given in another field. My situation is i need to show a cck text field based on the server time...if it doesn't matches, I need to display another cck text field.
I guess i can do this using "Computed fields". I read and got some clue from this post (http://drupal.org/node/182473 ) but yet i couldnt get this done .
please help me guys.
Comments
conditional fields
I'm not sure if I get you right but I see an alternative way by creating a select list or radioboxes filled by PHP with allowed values based on your server time. Assuming that the input from users has hour granularity you could offer 24 radioboxes and use conditional fields module to show another cck text field.
Thanks for reply! let me explain more
hi Gerldito
Thanks for your reply. i guess i'm not heading the details. let me explain.
Need to display either of two cck text content, based of the date input select by the user.
For example, when submitting a page, we will have 2 text field to enter two different content. if user select or enter "May 28 2009", he will see one content before this date and another one after this date.
I am aware of schedule module which doesnt suit my purpose. After a long search I came across, conditional field through which (i guess) i can accomplish my purpose.
Is there any way to make this done? any idea please?
I dont know if my guess of
I dont know if my guess of your request is correct.....
looks u are building a new content type, that may allow the user to input
1. text field 1
"Do u know what is ........? I will tell u the answer after May 30."
2. a date
May 30, 2009
3. text field 2
"the answer is xxxxx"
and what u want is, before May 30, all users can only see the text filed 1 (the question)
and after May 30, all users will only see the test field 2 (the answer)
is my guess correct?
sound interesting.....
simple estimation : need 20 hr to build it (10 dev + 10 testing)
Your are right! But how to do this ?
Hi Marcus,
What you have said is right, i want the same feature. (I hope you are joking with your "simple estimation". )
I am not sure how to do this. any suggestion or guidance? Any sort of help from cck or computed field master?
there are 2 solutions 1.
there are 2 solutions
1. pretty solution, a new module which with give you such content type.
(as it is a Module, dev + testing hr = 20 is ....not a joke.)
2. (ok..u just want a simple one ....here u are)
1. add those 3 fields.
2. in display fields, set "exclude on". (that means, not showing the fields)
2. in body, add some php code line, check the data field, then show either the text 1 or text 2 field.
(if u dont like coding inside body, may be ...add a compute field to show text 1 or text 2.)
simple enough ???
refer cck field...
Thanks a lot for your suggestion. I would give it a try.
since i am newbie, sorry for this doubt? how can i refer a particular cck field? for example: if i have created cck field with name with "data", how to refer it?
that's field_data
that's field_data
Anybody had it done before? Still looking for solution
I am still looking for some sort of solution for this. can anybody in the community help me out?
Module "Conditional Fields"
You probably are looking for the module Conditional Fields