Support

Account

Home Forums Front-end Issues How to add an upload field to front end form

Solving

How to add an upload field to front end form

  • Hi all,

    I’m kinda new to ACF so excuse my beginners question.
    I want to add a file upload filed to a pre made (custom code) post upload form on the front end, and than the uploaded file should be downloadable in the post itself. How do I do that? I didn’t find it in the tutorials.

  • Hi @efiminzer,

    Thanks for the question.

    To do this, you will need to include the following code in form’s $options array:

    /* (string) Whether to use the WP uploader or a basic input for image and file fields. Defaults to 'wp' 
    	Choices of 'wp' or 'basic'. Added in v5.2.4 */
    	'uploader' => 'wp'

    This will be a choice on whether to have the basic or the wp uploader in the form.

    You will then need to include the file field type to the field group that is assigned to the form in the ‘fields’ argument of the form.

    I hope this info helps.

  • I have tried this solution but no luck. Can you please tell me that this solution is applicable on Gallery field or not?
    If no, how could I achieve the same?

    Thanks

  • Hi @efiminzer @james @acf-support ..
    Please help me to resolve this issue. I will be really thankful.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘How to add an upload field to front end form’ is closed to new replies.