Need some help with your project? Contact me

Cool module: Webform Scheduler

Webform Scheduler is a cool module that allows you to schedule the opening and closing of a given webform. It works similarly to the Scheduler module except it does not publish/unpublish the node but simply opens/closes the webform on the node.

I have come across this module only recently due to a request that was made for webforms to be automatically closed at a specified date. Needless to say, this module worked like a charm for me so I decided to show you.

To get it going real quick, install like usual. With Drush if you go like drush dl webform_scheduler and drush en webform_scheduler -y, you are good to go. Make sure you have the Webform module installed though as it depends on it (drush dl webform && drush en webform -y will take care of that).

To use the webform scheduling functionality, edit the form settings of the webform you want (found at node/[node-id]/webform/configure) and below the Submission Access group you’ll find a new one called Scheduler:

There you can specify at what date the form should be open and at what date it should be closed. And you can rest assured that if you decide to manually close the form, this will take precedence over any scheduling. And you can also choose what happens when the form does get closed due to the scheduling: deny access to the whole page or just the webform itself or even show the webform but hide its components. Now this is some nice features to have.

And you have to admit the module is pretty powerful if you are dealing with a big website that needs to run many forms at the same time with various degree of overlap between their open times.

There is one thing however I needed and the module does not provide. I dread the default Webform drupal_set_message()-like message that appears at the top of the page when you are on a closed webform node. What I needed was a similar message appearing in the same place where the actual form was when it was open. So with some custom code I got rid of the top message (thaank god) and altered the node view to display my message instead of the webform when the latter is closed. Can you think of a better alternative? Drop a line in the comments if you can. Cheers!

Hope this helps.

Comments

  1. Create Drupal actions to open/close the webform (and submit it as a feature request to webform module)

  2. Use the Scheduled actions module to schedule webform open/close

  • You will get a list of all schedules, and do not have to click through all the webforms to know what will happen and when
  • You can schedule other kind of node action also

Although I haven't played around with Drupal actions for this use-case and it may be interesting from a Drupal-savy POV, for and end-user who just needs to manage a webform every now and then it does the job just fine and it's quite user friendly.

Not all content managers and editors using Drupal, know Drupal to that depth. Hence, nice contrib solution for a good end-user experience.

Keep it up. Who coded that module anyway. I mean to whom it belongs?

Add new comment

You must have Javascript enabled to use this form.