Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grouped blocks aren't greyed-out on pageload when maxLimit threshold has been reached #38

Closed
KarlBishop opened this issue Dec 13, 2021 · 3 comments

Comments

@KarlBishop
Copy link

I have a lot of blocks with maxLimit=1 split across several groups.

When I edit an entry that's already reached the maxLimit for various blocks, they are not greyed-out when the page first loads.

They only become greyed-out after I add or delete a block.

@mmikkel
Copy link
Member

mmikkel commented Dec 13, 2021

Hi @KarlBishop, having trouble reproducing this. Could you share your config/matrixmate.php file?

@KarlBishop
Copy link
Author

Yes, here it is:

<?php

return [
    'fields' => [
        'formFields' => [
            'groups' => [
              [
                'label' => 'Name',
                'types' => ['firstName', 'lastName'],
              ],
              [
                'label' => 'Contact',
                'types' => ['email', 'tel', 'emailOptIn', 'telOptIn'],
              ],
              [
                'label' => 'Address',
                'types' => ['address1', 'address2', 'address3', 'city', 'postcode', 'country'],
              ],
              [
                'label' => 'Custom',
                'types' => ['text', 'textarea', 'checkbox', 'select'],
              ]
            ],
            'types' => [
                // 'text' => [
                //     'tabs' => [[
                //         'label' => 'Text',
                //         'fields' => ['heading', 'text'],
                //     ], [
                //         'label' => 'Settings',
                //         'fields' => ['columns'],
                //     ]],
                //     'hiddenFields' => ['backgroundColor', 'textColor'],
                // ],
                'firstName'   => [ 'maxLimit' => 1 ],
                'lastName'    => [ 'maxLimit' => 1 ],
                'email'       => [ 'maxLimit' => 1 ],
                'tel'         => [ 'maxLimit' => 1 ],
                'emailOptIn'  => [ 'maxLimit' => 1 ],
                'telOptIn'    => [ 'maxLimit' => 1 ],
                'address1'    => [ 'maxLimit' => 1 ],
                'address2'    => [ 'maxLimit' => 1 ],
                'address3'    => [ 'maxLimit' => 1 ],
                'city'        => [ 'maxLimit' => 1 ],
                'postcode'    => [ 'maxLimit' => 1 ],
                'country'     => [ 'maxLimit' => 1 ],
            ],
        ],
    ],
];

@mmikkel
Copy link
Member

mmikkel commented Dec 13, 2021

Thank you @KarlBishop – should be resolved in MatrixMate 1.3.3.

@mmikkel mmikkel closed this as completed Dec 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants