How do I limit the number of forms a user can create in gravity forms?

I’ve been looking at Gravity Forms, and whilst it’s a great plugin, it’s missing some features.

I really want the ability to limit how many forms can be created by a role:

Read More

Administrator – Unlimited
Editor – 50
Author – 25
Subscriber – 0

I’ve looked at countless plugins and scoured the Internet, I’ve found one plugin that limits posts very well, so if it is possible to manipulate the plugin to achieve this goal, that would be great.

Dave

P.s. The plugin I’ve been looking at is: “Bainternet Posts Creation Limits

Related posts

1 comment

  1. Two things you can get cracking on right away are:

    1. Check out the developer documentation
    2. Browse the source code

    You’re looking for information on how the developers have coded the user permission check when they attempt to create a form. It might be a current_user_can() + capability combo, the use of custom filters & actions, or a combination of the two.

    Once you know this, you can “hook” in with your own plugin & extend the checking process. This will involve determining how many forms the current user has already created, so again you’ll need to refer back to the above, plus most likely an inspection of Gravity’s database schema.

    I don’t think the plugin you’ve mentioned will come in handy since it deals with posts, whilst Gravity is something quite entirely different.

Comments are closed.