2

I'm working on a grav plugin that works from the admin panel. I've added a new page to the admin nav sidebar with a custom template and I now want to add multiple forms to it with file upload. For testing purposes I started with a single form and while it does generate form when I use {% include "forms/form.html.twig" %} in the template, when I try to specify which form to generate with {% include "forms/form.html.twig" with { form: forms('testing') } %}, it's just blank. Any idea on how I can fix this?

Example of the form I want to render

forms:
    testing:
        method: POST
        fields:
            action:
                type: hidden
                default: "create"
            new_project_name:
                label: New project name
                type: text
                size: small
            new_description:
                type: Textarea
                label: 'Project description'
                name: 'new_description'
                id: 'new_description'

            new_project_files:
                type: file
                label: Project files
                multiple: True
                destination: user/pages/media/
                name: 'new_project_files'
                id: 'new_project_files'
                accept:
                    - image/*
                    - audio/*
                    - video/*
            create_history:
                label: Share with sycamore
                type: radio
                name: create_history
                default: true
                required: true
                options:
                    True: yes
                    False: no

        buttons:
            - type: submit
              value: Submit

        process:
            custom_upload: "create"

0 Answers0