Banshee
the secure PHP framework

Forum

Dynamic Form Builder

Joe Schmoe
30 may 2018, 21:52
I use Drupal for quite a few websites, but it seems pretty heavy for some of my use cases.

One of the pieces missing from Banshee (from my perspective) is the ability for a user, not a developer, to create and manage simple forms to collect data.

Event registrations and signup forms are the first examples that come to mind.

Any interest in this type of functionality?

I'm thinking about doing something that is a combination of tablemanager and splitform with the form field configuration and form submissions stored as serialized data in the database.

Having the data stored in a normalized fashion would probably be overkill (at least for a first iteration).

Here is an example YAML config from the newest form builder in Drupal. It could just as easily use JSON or something else.

first_name:
'#type': textfield
'#title': 'First Name'
last_name:
'#type': textfield
'#title': 'Last Name'
email:
'#type': email
'#title': 'Email Address'
'#required': true
interests:
'#type': checkboxes
'#title': 'I am interested in the following:'
'#options':
waitlist: 'Please add me to your wait list for membership in the monthly study group.'
workshops: 'Please notify me of any public workshop offerings or conferences.'
other: 'Other (see below)'
'#required': true
comments:
'#type': textarea
'#title': 'Comments or questions?'


Would be curious to hear your thoughts and suggestions! I'm just in the planning stage right now and gathering ideas.

Thanks!



Hugo Leisink
31 may 2018, 13:25
Building a form is easy. The question is: what to do with the information filled in in the form? That's what will make it complex. What's your idea?
Joe Schmoe
31 may 2018, 14:10
A couple of things to do with the info:

* Store it as serialized data in the database. It will not be referenced by other tables so there is no need to build separate tables for each form. Just for reporting purposes.
* Make the data exportable as a CSV
* Send confirmation email notifications to submitter
* Send notification email to admin

I don't know if building the form will be easy, at least for me and the way I would like to do it.

Have the user select from a list of field types (text, textarea, checkbox, select) and then add some configuration options (field label, validation options, css classes, etc).

Some quick examples:


https://formbuilder.online/

Probably a little ambitious but partly its to challenge myself a bit.
Hugo Leisink
4 june 2018, 09:12
Interesting feature request. No promises yet, but I'll think about it.
Joe Schmoe
4 june 2018, 17:11
Hugo, this is a project I was planning to work on myself. I was just mainly trying to gather feedback and see if you thought it would be a helpful module.

I'll try to post some working code as I progress and any help you want to provide would be greatly appreciated.

Hugo Leisink
4 june 2018, 19:03
Sounds good!
chapchap70
6 june 2018, 06:30
Hi Joe,

I look forward to reading what you post here.

A module like this would be great! Currently, we use Wufoo to have people sign up for our events. I don't like info going through third parties if I can help it but making a module like this is beyond my capabilities right now. I only have CMS access at the website I volunteer as webmaster for and that doesn't have a form module.
Hugo Leisink
12 june 2018, 17:03
I've also thought about this. Although I like the idea of offering a tool to build forms, I don't like the whole complexity of a Javascript form builder. I favor the principle of if you want something simple, it should be made simple. The more complexity you want, the more requirements there can be in terms of knowledge and skill.

What I'm building now is an extension to the page CMS module. Via a very simple script language, you can enter form elements in a page. Banshee will construct a form out of it. You can only create simple forms and get the results sent to you by e-mail. If you want a more complex / advance form, start programming (or hire a programmer).
Joe Schmoe
13 june 2018, 13:25
I'm not a javascript developer so anything I do will definitely be simple.
Message preview

The following BB-codes are available in a message:

  • [b]Bold text[/b]
  • [center]Center text or imagen[/center]
  • [color=color name or #RGB code]Colored text[/color]
  • [i]Italic text[/i]
  • [img]Link to image[/img]
  • [right]Align text or image right[/right]
  • [s]Strike-through text[/s]
  • [size=pixelsize]Big or small text[/size]
  • [u]Underlined text[/u]
  • [url]Link to website[/url]
  • [url=link to website]Link text[/url]