Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jarcas's avatar

Is there a 'form builder' to kind of standardize the way forms are built in blade views?

I have a very form heavy application that I'm reworking, and I want to be able to do something like:

{{ form-input(type, name, id, default value, etc.) }}

In my .blade views or the controller. The reason for this is that I have a lot of forms spread across the site, and I'm tired of retyping or copying/pasting all the boilerplate html/css stuff. Not to mention having to update them all if I want to change how it looks. I'm using Tailwind, so there's typically a lot of boilerplate I have to rewrite each time.

An added bonus would be being able to quickly change a template and have it change all of the forms at once.

So I have to know - is there an existing, up to date library to do this? One that doesn't use Vue or React, just plain html/tailwind.

I'm using Laravel 11 and obviously Tailwind. Although I guess if I can publish the views for the library I can modify it to use whatever.

0 likes
2 replies
tykus's avatar

Rather than a form builder, you can instead create a system of Blade Components. Take a look at how Laravel Breeze, for example, has components for the common form elements.

Or, for a simpler example, take a look at the components Jeffrey created for the 30 days to learn Laravel series.

2 likes

Please or to participate in this conversation.