Skip Navigation

[Resolved] Impose Total Upload Limits per Access Role

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 6.78 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)


Tell us what you are trying to do? Have asked this before with no affirmation. Can Toolset allow developer to impose total upload limits per Access role or Role in general? For example: Role A 100MB, Role B 200MB... or upgrade for more upload storage.

Is there any documentation that you are following? No

Is there a similar example that we can see? This is a standard function of modern subscription/membership models. I cannot figure out how to achieve this with Toolset.

What is the link to your site? Provided in the form site selection. Is this information stricken in the post?



Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)


Thank you for contacting us and I'd be happy to assist.

This feature is not available out of the box, so implementing an upload limit like this will require a fair amount of customization.

For example, you can add two user custom fields "Total allowed uploads size" and "Total consumed uploads size".

You'll need to make sure that the users can upload the files only through Toolset Forms.

Using the "cred_form_validate" hook, you can include a custom validation function to check the size of the file being uploaded and allow the form submission only if the sum of the "Total consumed uploads size" field value and the currently uploaded file, doesn't exceed the value of the custom field "Total allowed uploads size":

And on successful form submission, you can use the custom function attached to the hook "cred_save_data" to add the new file's size, to the value of the current user's "Total consumed uploads size" field:

I hope this helps and for more personalized assistance around custom code, you can also consider hiring a professional from our list of recommended contractors:


This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.