Closed (fixed)
Project:
Webform
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
14 Oct 2008 at 17:49 UTC
Updated:
21 Dec 2009 at 07:56 UTC
Hello, I would like to ask if it's possible to control the limitation in the number of submissions not just in the configuration of the webform but according to other data in the drupal database related to the user filling it (for example, if someone has bought 3 of the same products that allow him/her to send 3 submissions) Thanks!
Comments
Comment #1
quicksketchYou could potentially do this with a hook_nodeapi(). Due to the infinite number of criteria that users could use to create limits, this won't be an option in the Webform UI.
Comment #2
daniorama commentedThank you a lot quicksketch. I will try it and as soon as I find how to connect it with Ubercart (that's what I'm using) I will post it here. I think this could help a lot for event registration. I know there is a module doing integration with Webform and Ubercart but it's giving me some errors and I need this as soon as possible. I will try it.
If I create my own customized module what should I put in the submission limit when I create the webform? Should I put without limits or should I create a limit (I mean, what will control the limitation? the UI field, my module or both of them together?)
I would like to change the submission limit in just some of the webforms. Is it possible to clone the "webform" content type so I use it in the condition or it would be better to use another kind of condition?
Thanks again!
Comment #3
quicksketchIt's not possible to copy the webform content type as it is sort of a "classic" content type, from the days before CCK or even custom content types. So it's not possible to have multiple types that have webform's functionality. However, you could work around this problem by adding a Taxonomy or CCK select list to your type, then checking the taxonomy term in your hook_nodeapi(), and only applying the limit if the webform has a certain term.
Comment #4
daniorama commentedYes, you are right, that is a far better option. Thanks again!
You have helped me a lot, I will try now on my own to create a custom module for this issue. As long as I have something working and if someone is also interested I will post it here, but I have to say this would be a "cheap" customized module for my needs just to get this working.
Comment #5
quicksketch