Tagged: php

Restricting Drupal’s upload module to N attachments 0

Restricting Drupal’s upload module to N attachments

If you’ve enabled the node attachments support in Drupal 6 and needed to limit it’s use for only allowing to attach one file per node and didn’t know how then this post is for you. You can also achieve the same thing with the CCK’s FileField module by attaching it and setting the field to appear once instead of ‘Unlimited’ though there may be cases where you just don’t want...

Maintaining states between form submit and node hooks in Drupal 6 0

Maintaining states between form submit and node hooks in Drupal 6

With Drupal, it is many times the case where you’d find yourself working with custom forms or alter existing forms through the Form API and end up modifying the submit handler so that you are essentially triggering node_save() yourself. If you find yourself in such scenario where you are also having conditional actions in an implementation of hook_nodeapi() then you’ll soon enough realize that there is complete isolation between the...