Form template customization



Hi everyone. I’ve trying to customize the FormHelper theme to suit Bulma CSS library.

Everything seems to be working except the error message is being displayed inside the email input instead of displaying it outside. As the email label name disappears from its place.

InputLabel has class=“label”, but that class isn’t rendered in the generated label tag.

I believe your inputContainerError HTML should look more like your inputContainer HTML, not like the input HTML.

I’m not sure what do you really mean, but the themes are the same as the CakePHP default ones except a few extra divs and classes.

I looked up the default, it’s:
<div class="input {{type}}{{required}} error">{{content}}{{error}}</div>
Your version is missing {{content}}, which seems pretty critical; it’ll be the label and input field.

1 Like

I was following the the FormHelper doc which is kinda confusing. But have FormHelper.php as reference right now. Thank you very much.