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

FormHelper RuntimeException Cannot find template named 'selectedClass' #193

Open
1 of 3 tasks
jwhoami opened this issue Nov 11, 2020 · 2 comments
Open
1 of 3 tasks

Comments

@jwhoami
Copy link

jwhoami commented Nov 11, 2020

This is a (multiple allowed):

  • bug

  • enhancement

  • question

  • CakePHP Version: 3.9.3.

  • Plugin Version/Branch: '4.0.2'.

What you did

Used this code:
Form->control('zones', ['type' => 'select', 'label' => 'Zones', 'options' => ['Zone1' => 'Zone 1', 'Zone2' => 'Zone 2'] 'default' => 1, 'multiple' => 'checkbox']);?>

What happened

Got a RuntimeException: Cannot find template named 'selectedClass'

What i did

I edited the FormHelper.php file in the vendors directory. Added the following to the templates array:
'selectedClass' => 'selected'

which fixed the problem for me. However i do not know if the fix is right. I just wanted to report this so you might look into it and apply the correct fix.
Regards
Jack

@raul338
Copy link
Contributor

raul338 commented Nov 11, 2020

refs #192

In the meantime, you can set that template in the loadHelper call

@Holt59
Copy link
Collaborator

Holt59 commented Nov 12, 2020

Sorry, I completely forgot about this. I pushed to the v4.0.3 branch and make a 4.0.3 release that should fix this.

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

3 participants