docs-archive icon indicating copy to clipboard operation
docs-archive copied to clipboard

DCA reference: input type "upload" is not documented

Open nkirstein opened this issue 10 years ago • 4 comments

The form file upload widget from system/modules/core/forms/FormFileUpload.php has been around for a long time but it never seems to have made it into the DCA documentation. I'd like to suggest the following additions to the DCA reference:

Fields

Key Value Description
inputType Field type (string) ...
...
upload File upload

Evaluation

Key Value Description
storeFile true/false (boolean) If true, the uploaded file will be stored on the server. Applies to upload fields only.
uploadFolder Path to upload folder (string) Specifies the folder where uploaded files will be stored. Applies to upload fields only.
useHomeDir true/false (boolean) If true, the user's home directory will be used as upload folder. Applies to upload fields only.
doNotOverwrite true/false (boolean) If true, existing files of the same name will not be overwritten. Applies to upload fields only.

Actually I'm not totally sure if these options only apply to the "upload" field type. Maybe someone more knowledgeable could check this?

nkirstein avatar Jun 04 '15 19:06 nkirstein

Be aware that the upload field does only work in the frontend. I think the DCA reference currently refers to the backend configuration. What do you think?

aschempp avatar Jun 04 '15 20:06 aschempp

Yeap, i agree to @aschempp ... DCA is backend ... die frontend formfield is described in section 4.6 Form fields

cliffparnitzky avatar Jun 05 '15 07:06 cliffparnitzky

You're right, I got this mixed up because I'm using the DCA to add an upload form field to the Personal Data frontend module.

nkirstein avatar Jun 05 '15 07:06 nkirstein

We should add a documentation about these widgets too, but not in the DCA config. Let's keep this open for the API book.

aschempp avatar Jun 05 '15 08:06 aschempp