I was wondering how to create a field that only appears after the node has been posted for more than a week

the field would be a single checkbox, and would only be click-able (or visible) in the edit form after post date of node is great than one week.

so my guess at it would be something like:

if (!postdate -> array { >7days } )
print "cck field"

yea, u probably see i dont have a clue here..

but it must be simply to do, anyone wanna give me a hint here?\

thanks tons.

Comments

yuriy.babenko’s picture

Make a new module that extends the node edit form via hook_form_alter()

Then you can do a check like:

  if($node->created > (time() + 60*60*24*7 ))
  {
    //add checkbox
  }

---
Yuriy Babenko
www.yubastudios.com
My Drupal tutorials: http://yubastudios.com/blog/tag/tutorials

---
Yuriy Babenko | Technical Consultant & Senior Developer
http://yuriybabenko.com