Abey's avatar
Level 1

Database Design for Drag and drop form

Hi I am developing a laravel project which have a Drag and drop form that can dynamically change it's form elements based on the user request, I need to store the submitted data and input type of the fields in the database table. is there any suggested way I can use??

0 likes
3 replies
Abey's avatar
Level 1

ok! thanks, My requirement is just to store the given data and view the stored data. the rows shouldn't be similar as we will not use the data for generating reports or other grouping functions.

automica's avatar

we based our schema structure on jquery formbuilder json and referenced an earlier version of this site.

https://formbuilder.online/

using their drag and drop interface, you'd end up with something like:

[
  {
    "type": "text",
    "required": false,
    "label": "Field1",
    "className": "form-control",
    "name": "text-1602059173948",
    "access": false,
    "subtype": "text"
  },
  {
    "type": "text",
    "required": false,
    "label": "Field 2",
    "className": "form-control",
    "name": "text-1602059176781",
    "access": false,
    "subtype": "text"
  },
 {
    "type": "button",
    "label": "Button",
    "subtype": "button",
    "className": "btn-default btn",
    "name": "button-1602059380949",
    "access": false,
    "style": "default"
  }
]

you are welcome to reference our package, but its pretty much deprecated now so wont install on recent Laravel.

https://github.com/nomensa/FormBuilder-Laravel

Please or to participate in this conversation.