Problem: I would like to resize the original images uploaded with Forms, similar to Formidable Forms or resmush.it.
Solution: Forms doesn't have a built-in option for resizing uploaded original images, but if you use Types field shortcodes to display the images it's possible to save various resized images to minimize image file sizes when they are displayed on the front-end of the site.
If you want to validate the image sizes during the file upload process, you can use the Forms API. Similarly, you can use the Forms API to trigger your own custom image resize code.
Relevant Documentation:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
https://toolset.com/documentation/programmer-reference/cred-api/#cred_form_ajax_upload_validate
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 |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
This topic contains 2 replies, has 2 voices.
Last updated by 6 years, 4 months ago.
Assisted by: Christian Cox.