---
title: 'Include checkbox options from another file'
url: 'https://getgrav.org/forum/forms-blueprints/include-checkbox-options-from-another-file-t8978'
markdown: 'https://getgrav.org/forum/forms-blueprints/include-checkbox-options-from-another-file-t8978.md'
date: '2026-06-21'
description: 'Hi, I’m Grav beginner and I’d like to give to some editors an access only to checkbox options, preventing them to change the form structure and checkboxes'
---

[Forms & Blueprints](https://getgrav.org/forum/forms-blueprints)

#  Include checkbox options from another file 

 [first-time](https://getgrav.org/forum/tag/first-time)

  Started by Flachy Joe 11 months ago · 9 replies · 1015 views    

 [11 months ago](https://getgrav.org/forum/forms-blueprints/include-checkbox-options-from-another-file-t8978#post-41094 "Permalink") 

Hi,

I’m Grav beginner and I’d like to give to some editors an access only to checkbox options, preventing them to change the form structure and checkboxes labels.

I currently have this form

```yaml
title: 'Inscription'
published: true
visible: true
form:
    name: inscription
    fields:
        perso:
            type: section
            title: 'Personal information'
            fields:
                name:
                    label: Name
                    type: text
                    validate:
                        required: true
        choices:
            type: section
            title: 'Select at least one case'
            fields:
                firstOption:
                    label: 'Option 1'
                    type: checkboxes
                    options:
                        0802-0808: '08-02 to 08-08 2026'
                secondOption:
                    label: 'Option 2'
                    type: checkboxes
                    options:
                        0412-0418: '04-12 to 04-18 2026'
                        0419-0425: '04-19 to 04-25 2026'
```

Is it possible to create the date options from another file?

 [11 months ago](https://getgrav.org/forum/forms-blueprints/include-checkbox-options-from-another-file-t8978#post-41097 "Permalink") 

You could create a very simple plugin with a static method and then use it to fill options with `data-options@`

<https://learn.getgrav.org/17/forms/blueprints/advanced-features#using-function-calls-data-at>

 [11 months ago](https://getgrav.org/forum/forms-blueprints/include-checkbox-options-from-another-file-t8978#post-41098 "Permalink") 

Thank for the interest.
So I have to write a PHP function which read the file and return the options?

It can't simply read the data from a yaml?

 [11 months ago](https://getgrav.org/forum/forms-blueprints/include-checkbox-options-from-another-file-t8978#post-41099 "Permalink") 

I find exactly what I need and very easy to use:
@Karmalakas you point me in the good direction with`data-option@` but I'm using `config-options@` with a custom YAML file as described here: <https://learn.getgrav.org/16/cookbook/admin-recipes>

But now I have to set the permissions to allow my editor group to change only this config page 😬 Can someone help?

 [11 months ago](https://getgrav.org/forum/forms-blueprints/include-checkbox-options-from-another-file-t8978#post-41101 "Permalink") 

Ok, I've seen this <https://stackoverflow.com/questions/79040787/how-do-i-add-a-custom-permission-for-a-custom-configuration-area-to-the-grav-adm>

So it's not possible to set the permission for a specific config page. That's why @Karmalakas tell me to create a plugin, yes?

 [11 months ago](https://getgrav.org/forum/forms-blueprints/include-checkbox-options-from-another-file-t8978#post-41103 "Permalink") 

That post is about a different problem I think. Or I completely misunderstood what you're asking. Can you clarify?

 [11 months ago](https://getgrav.org/forum/forms-blueprints/include-checkbox-options-from-another-file-t8978#post-41105 "Permalink") 

My visitor have to choose one (or more) date by checking a box.
My editor have to enter the dates the visitor can check.
I 'd like my editor can only change this configuration, without any other access to admin.

I tried to write a plugin, it works well but the page to enter dates resides in this plugin configuration so I'd have to allow editor to access the plugin area.

I tried the stackoverflow solution linked above with a plugin to tweak the permissions of a custom configuration page but I can't get it working, nothing appear in the admin menu.

So now I'm back in the `user/config/site.yaml` extension by a `user/blueprints/config/site.yaml` file and I give the editor access to this page.

 [11 months ago](https://getgrav.org/forum/forms-blueprints/include-checkbox-options-from-another-file-t8978#post-41106 "Permalink") 

Oh, I've an idea: can `user/blueprints/config/site.yaml` crush the `user/config/site.yaml` with condition? So in the case the editor access it, it display only the date config but if another admin does it extends the original page.

 [11 months ago](https://getgrav.org/forum/forms-blueprints/include-checkbox-options-from-another-file-t8978#post-41107 "Permalink") 

@FlachyJoe, Instead of investing a lot of time and effort to prevent the user from doing anything wrong by boarding everything up, you might consider informing/educating the user about what to do, what not and its consequences.

I like the adage of the Python community: We are all adults.

 [11 months ago](https://getgrav.org/forum/forms-blueprints/include-checkbox-options-from-another-file-t8978#post-41108 "Permalink") 

You're obviously right but if I warn the editors about any possible misconfiguration in the admin panel then they won't log in ever and will ask me to edit for them… :face\_with\_bags\_under\_eyes:

[Log in](https://getgrav.org/login?return=%2Fforum%2Fforms-blueprints%2Finclude-checkbox-options-from-another-file-t8978) to reply.

###  Suggested topics

 | Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| [Create a simple single form](https://getgrav.org/forum/forms-blueprints/create-a-simple-single-form-t9477)    [Forms & Blueprints](https://getgrav.org/forum/forms-blueprints) · by TomW, 3 weeks ago |  | 3 | 270 | [3 weeks ago](https://getgrav.org/forum/forms-blueprints/create-a-simple-single-form-t9477 "by TomW") |
| [Is it possible to disable media listing in admin for a single page (800 images, done automatically in twig), loading fails.](https://getgrav.org/forum/forms-blueprints/is-it-possible-to-disable-media-listing-in-admin-for-a-single-page-800-images-done-automatically-in-twig-loading-fails-t9443)    [Forms & Blueprints](https://getgrav.org/forum/forms-blueprints) · by Japhy, 1 month ago |  | 2 | 520 | [1 month ago](https://getgrav.org/forum/forms-blueprints/is-it-possible-to-disable-media-listing-in-admin-for-a-single-page-800-images-done-automatically-in-twig-loading-fails-t9443 "by Japhy") |
| [Date format in admin forms](https://getgrav.org/forum/forms-blueprints/date-format-in-admin-forms-t9427)    [Forms & Blueprints](https://getgrav.org/forum/forms-blueprints) · by FrViPofm, 2 months ago |  | 5 | 516 | [2 months ago](https://getgrav.org/forum/forms-blueprints/date-format-in-admin-forms-t9427 "by Andy Miller") |
| [Getting modular form to work with Typhoon template](https://getgrav.org/forum/forms-blueprints/getting-modular-form-to-work-with-typhoon-template-t6187)    [Forms & Blueprints](https://getgrav.org/forum/forms-blueprints) · by Ton Haarmans, 6 years ago |  | 13 | 2510 | [9 months ago](https://getgrav.org/forum/forms-blueprints/getting-modular-form-to-work-with-typhoon-template-t6187 "by Stanislav") |
| [Form works different on different devices](https://getgrav.org/forum/forms-blueprints/form-works-different-on-different-devices-t1656)    [Forms & Blueprints](https://getgrav.org/forum/forms-blueprints) · by Hugo Oliveira, 10 months ago |  | 0 | 953 | [10 months ago](https://getgrav.org/forum/forms-blueprints/form-works-different-on-different-devices-t1656 "by Hugo Oliveira") |
