grav-theme-big-picture icon indicating copy to clipboard operation
grav-theme-big-picture copied to clipboard

radio buttons do not work

Open hsweet opened this issue 1 year ago • 4 comments

I can't get radio buttons to work in this theme. The code works properly using Quark theme. In big picture it only displays the values, in this example

Markdown Twig

not

O Markdown O Twig

as it should

form:
    action: /home
    name: contact-form
    fields:
        name:
            label: Name
            placeholder: 'Enter your name'
            autocomplete: 'on'
            type: text
            validate:
                required: true
        email:
            label: Email
            placeholder: 'Enter your email address'
            type: email
            validate:
                required: true
        message:
            label: Message
            placeholder: 'Enter your message'
            type: textarea
            validate:
                required: true
        my_choice:
            type: radio
            label: Choice
            default: markdown
            options:
                markdown: Markdown
                twig: Twig

etc...

It outputs this html:

            <div class="field">
                    <div class="form-field  ">
          <div class="form-data"
          data-grav-field="radio"
  data-grav-disabled=""
  data-grav-default="&quot;markdown&quot;"
    >
                          
        <div class="radio  ">
            <input type="radio"
                   value="markdown"
                   id="my_choice-markdown"
                   name="data[my_choice]"
                   class=" "
                   checked="checked"                                                                      />
            <label style="display: inline" class="inline" for="my_choice-markdown">Markdown</label>
        </div>
            
        <div class="radio  ">
            <input type="radio"
                   value="twig"
                   id="my_choice-twig"
                   name="data[my_choice]"
                   class=" "
                                                                                        />
            <label style="display: inline" class="inline" for="my_choice-twig">Twig</label>
        </div>
                    </div>
  </div>
                  </div>
                                      
            <div class="field">
                    <div class="form-field  ">
          <div class="form-data"
          data-grav-field="radio"
  data-grav-disabled=""
  data-grav-default="null"
    >

hsweet avatar Jan 21 '24 11:01 hsweet