Start a conversation

CDM Upload Form ShortCode

Click here to view plugin

The upload form can be used as many times as you want on your website and configured in many different ways, we highly recommend setting file types so no malicious files are uploaded and also recommend that you add recaptcha keys in the premium settings so there are no spam entries.

Screenshot

Shortcode Usage

Available Variables

  • success (message,redirect)
    success defaults to message and displays what is in the “message” variable. Set it to “redirect” and it will redirect to the “redirect” variable
  • message (string)
    If “success” is set to message then this text is displayed after upload
  • redirect (url)
    If “success” is set to “redirect” then redirect to this url
  • categories (1,0)
    Can be set to 1 or 0 to display or not display categories
  • pid (folder_id,0,comma-separated folder_ids)
    Defaults to 0, which displays a dropdown of all available folders
    Set to a  folder_id to hide the dropdown and to upload all files to a specific folder
    Comma seperate folder_ids to display a dropdown of pre-selected folders
  • limit (number)
    Can be set to limit the amount of files that can be uploaded
  • file_size (megabytes(int))
    Can be set to a number to limit file size
  • file_types (comma seperated)
    Comma-separated list of allowed extensions, defaults to: jpg,png,pdf,doc,docx,pptx,ppt,psd
  • notes (1,0)
    Can be set to 1 or 0 to display the notes field
  • extra_fields (1,0)
    Can be set to 1 or 0 to add the extra fields into the form

 

Here is an example of a shortcode which offers a thank you message after upload and limiting to 5 files

[cdm_upload_form success="message" categories="1" limit="5" message="Thank you for your upload, we will contact you ASAP" file_types="jpg,png,pdf,doc,docx,pptx,ppt,psd"]

Here is an example of a form which redirects to a url and has a predefined set of folders

[cdm_upload_form success="redirect" pid="7,21,6" categories="0" limit="5" redirect="http://example.com/thankyou" file_types="jpg,png,pdf,doc,docx,pptx,ppt,psd"]

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Anthony Brown

  2. Posted
  3. Updated

Comments