Closed (fixed)
Project:
Webform
Version:
7.x-3.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Sep 2011 at 15:46 UTC
Updated:
8 Dec 2011 at 02:16 UTC
Hello,
I need to disable programaticaly a webform for people that register to a seat limited seminar session.
I could hide the form in a block and use the php hide or display option for the block but I need to limit that display to a specific path (say: "seminar-register"). As I can have only one option set for the bloc visibility true / false on code or only display on specified path, I was wondering I could place a call to disable the webform. I know this option exists in the admin for webform but I need to access it via code. Is this possible ? Is there a documented api call I might user ?
Thank you !
Comments
Comment #1
vernond commentedThere isn't a api call for this functionality. If you have time to create a D7 port (it goes mostly around changing the database access stuff), maybe this project can help you: http://drupal.org/project/webform_limit_submissions
Comment #2
quicksketchYou can disable any Webform by settings $node->webform['status'] = 0;
Though now that #503264: Limit the total number of submissions is going to be in the next version of Webform (3.15) you might not need any custom code at all.
I'm going to close this issue after a lack of activity.