Hi,

This post is very similar to this one : http://drupal.org/node/690894

I think it would be great if there were an option to disable a webform (in my case, a webform from my node-type), but keep the node published.

So one could enable/disable it at anytime.

Comments

quicksketch’s picture

Status: Active » Fixed

You can disable a Webform already by unchecking all the roles that may submit the Webform.

Ludo.R’s picture

Yes, you're right!

But for a simple user, that's not quite clear.
And suppose, you have a lot of roles, you will have to remmeber which roles may submit a form each time you want to enable the form again.

That said, it is not a criticism, but just a remark.
You're doing a great job with this module!

I hope some day, i can release the module im developping. It is tightly linked to the webform module (3.x).

Ludo.R’s picture

I think this could be easily done by doing something like this :

/**
 * Implementation of hook_node_load().
 */
function webform_node_load($node) {
  module_load_include('inc', 'webform', 'includes/webform.components');
  $additions = array();

  if (isset($node->nid) && ($webform = db_fetch_array(db_query('SELECT * FROM {webform} WHERE nid = %d AND status = 1', $node->nid)))) {
	...
  }
  ...
  return $additions;
}

Just adding a "status" property to the webform.

Ludo.R’s picture

Hi,

Sorry to bother you but is there any chance this feature will be integrated in the module?

Is there a reason why this could not be added in this module?

Ludo.R’s picture

Status: Fixed » Active
quicksketch’s picture

Status: Active » Closed (duplicate)

Let's merge this request with #690894: Schedule form to be active/deactivate (open/close) on specific dates?. I've updated that issue to reflect that it should include this functionality.

quicksketch’s picture

Title: Disable a webform » Easier mechanism to open/close forms