Skip to content

CheckBoxes and Radio Buttons do not render #416

@tadward

Description

@tadward

Any CheckBoxes and/or Radio Buttons fields in a Payment form don't render on the front-end. This happens whether I use custom templates or not.

I set the Custom Templates to on and within the checkboxes.twig template I put the following

{{ dump(block.options) }}

It outputs as null when viewing the front-end. I have a CheckBoxes field in place within my Payment Form, as seen below.

Image

I did notice that the field handle for the Options table is options3. This is the case with any CheckBoxes field I add to the Payment Form.

If I update the dump to {{ dump(block.options3) }} I will output the array for that table, see below
array:1 [▼0 =>array:4 [▼ "col1" => "Yes" "col2" => "" "optionLabel" => "Yes" "value" => "" ] ]

In the sample template, provided by the plugin, updating the options variable to match the field handle allows for the checkbox to render via the front-end; e.g. {%- set options = block.options3 ? block.options3 : [] %}

Radio Buttons, the handle is options2

I am running Craft v5.8.16 and Stripe Payments Pro (trial) v6.0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions