Skip Navigation

[Resolved] How to set video time limit of video custom field when uploading

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to set video time limit of video custom field when uploading

Solution:
There is no native way to validate the uploaded video for time duration. You can check the uploaded file size but not the time.

Relevant Documentation:

This support ticket is created 3 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 4 replies, has 2 voices.

Last updated by Tai Chang 3 years, 6 months ago.

Assisted by: Minesh.

Author
Posts
#2089529

I create a form with custom field of video, to let website user to upload video. However, I wish to set the video time limit for the upload. How can I do it?

Also, in the same form, I have a repeatable custom field of image for upload. How can I send the maximum number of images can be uploaded in the form?

#2090047

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

There is no native way to validate the uploaded video for time duration. You can check the uploaded file size but not the time.

#2090055

Hi Minesh

Thanks for your kind feedback.

If I understand you correctly, there is no way in Toolset can set any time limit for video file upload. It can only be checked the file size, not the video time, after the video file is uploaded via Toolset form with video custom field.

What about to set limitation on number of images to be uploaded via Toolset form in which I created a repeated custom field of image? Can I set anything in Toolset or even write any code to limit the maximum number of images to be uploaded by website member when inputting data into the Toolset form?

Look forward to your kind support. Thanks!

#2090081

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

If I understand you correctly, there is no way in Toolset can set any time limit for video file upload. It can only be checked the file size, not the video time, after the video file is uploaded via Toolset form with video custom field.
==>
Yes, not only with Toolset, you will not be able to see the workaround even using core PHP as well. You may need to use few advance libraries.

What about to set limitation on number of images to be uploaded via Toolset form in which I created a repeated custom field of image? Can I set anything in Toolset or even write any code to limit the maximum number of images to be uploaded by website member when inputting data into the Toolset form?
==>
Yes, you can validate the maximum number of images using the Toolset Form's hook: cred_form_validate
=> https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_validate

#2092381

My issue is resolved now. Thank you!