kashif's avatar

How to create html form builder using drag and drop and save all the fields into database using laravel

Hello,

I wan to create an application which i want to create a option for super admin can be create a Module (Employee, HR) then in that module super admin can create a custom form using drag and drop options that form fields and module save into database and super admin can set permissions on form fields for different users can access and save the data into database.

Thanks Kashif Asghar

0 likes
7 replies
Snapey's avatar

you can do this the same way as eating an elephant.... one bite at a time.

There is not really any way to answer this question through the forum unless you are asking someone to suggest an off the shelf solution.

Have a look at Voyager for some ideas https://laravel-news.com/voyager

Otherwise you are going to just have to make a start and resolve one problem at a time.

1 like
jlrdw's avatar

Perhaps an easy one click solution. --immck probably knows how.

1 like
jekinney's avatar

When I did one, I whipped out some pencil and paper and broke it down into separate parts.

Obviously the GUI would be a part. Wireframe that up.

Figuring out what technologies is another. Use jquery ui or something else?

Then figure out what data I need to store and how. Save to a file, HTML or php? Save to MySQL in Json or plain HTML, or utilize something like helper classes to output HTML (like collectives form helpers?).

How are you going to display the form?

Once you get each part penciled in google and do a lot of research. I know there are packages, but keep in mind it might be more efficient to code it all your self then try to "make" a package work.

Any case good luck. I've done it twice and it's horribly inefficient (performance wise) and requires a lot of checks, data manipulation and if you store in db, a lot of queries not to mention validation.

Hopefully you have a good acl and experience with them. That will help a lot. Most acl packages won't cut it.

1 like
jlrdw's avatar

@jekinney what, laravel doesn't come with an out of the box easy one click of the mouse complete application Builder, wow. OP I have a secret I will share I learned HTML a long time ago I can actually type out an HTML form with divisions and everything in almost no time so the secret is learn HTML well and you can Envision what you are doing in your mind. Actually better than drag and drop.

2 likes
phpMick's avatar

@jlrdw I think the whole point of this, is that an admin can create new forms, not the developer.

I think that most Web Developers can knock up a HTML form. They learn that on day 1.

jazmy's avatar

I realize this post is about 2 years after the initial request but I was researching drag and drop form builders for laravel and had trouble finding a solution. If you find yourself reading this thread and you want to give your site members the ability to create their own custom forms then check out this package:

https://github.com/jazmy/laravel-formbuilder

It will give you a starting point so you can integrate it into your own laravel apps. The package will allow your members to create custom forms, surveys, etc... inside your application.

If all you need is an admin interface form builder then Voyager: https://laravelvoyager.com/ or Laravel Nova: https://nova.laravel.com/ are excellent options.

Please or to participate in this conversation.