Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Refer to the current item in blueprints list for conditionnal field

Started by Benjam 8 years ago · 0 replies · 580 views
8 years ago

Hello People,

i'm wondering how to refer to the current item in a blueprint list for a conditional field ?

here is my code ;

YAML
extends@: default

form:
  fields:
    tabs:
      fields:
        content:
          fields:

            partenaires:
              type: section
              title: Partenaires
              underline: true
              fields:
                header.partenaires:
                  name: Partenaires
                  type: list
                  label: Liste des partenaires
                  btnLabel: Ajouter un partenaire
                  fields:
                    .image:
                      type: pagemediaselect
                      label: Image
                      preview_images: true
                    .name:
                      type: text
                      label: Titre
                    .description:
                      type: textarea
                      label: Description
                    .url:
                      type: text
                      label: Url
                      validate:
                        type: url
                    .location:
                      type: toggle
                      label: Location
                      highlight: 1
                      default: 0
                      options:
                        1: Activé
                        0: Désactivé
                      validate:
                        type: bool
                    .is_location:
                      type: conditionnal
                      condition: "page.header.partenaires.location.enabled ? 'true' : 'false'"
                      fields:
                        .date:
                          type: datetime
                          label: Date de fin de location**strong text**
last edited 04/27/19 by Benjam

Suggested topics

Topic Participants Replies Views Activity
General · by themetman, 23 hours ago
2 40 16 hours ago
General · by Hanns Mattes, 1 week ago
0 121 1 week ago
General · by Karmalakas, 1 week ago
2 185 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 235 3 weeks ago
General · by Dima, 4 weeks ago
1 211 4 weeks ago