form block road map

Permalink
This message is more so directed towards the core team, but i wanted to post it here so everyone could be a part of the discussion...

I am wondering if there are any plans currently in place for the future of the Form block that is included with the core C5 blocks. I think the block does a good just with putting together a contact form pretty quickly, but it does lack more advanced features that could be very helpful, and the code looks like it could use some organization as well.

That said, are there any specific plans for this block in an upcoming release of C5? Some specific features that I think could be very helpful would be:

-Field validation (like email, numeric, num. chars., etc.)
-Option to autopopulate select options with common values (states, country, months, days of the week)
-Additional field types like date (where you can pick a date from a pop-up calendar)
-Tableless layout

I'm sure there are some other things other people could think of. Anyone have any thoughts?

jgarcia
 
bryanlewis replied on at Permalink Reply
bryanlewis
I agree with Justin. The core form block is great for easy of use and quickly done forms. A more advanced one would be nice though.

If I think of any features I'll be sure to add them.
Tony replied on at Permalink Reply
Tony
guess I should participate in this thread since most of the form block was my doing. quite honestly, the code there has become a mess. the first version of the form block was something quite simple. many of additions have been piled on that weren't really anticipated from the start of it, including the versioning of questions (tied to page versions), which have turned the code into spaghetti. it's reached a point where it's going to be hard to extend without doing some refactoring and cleaning up of what's there.

that being said, we've got this new extendable attribute system that andrew came up with that is awesome. people are always going to have unique requirements for their forms, and weird data that they need to collect, so I'm wondering if there would be a way to get the form block to take advantage of the new attribute framework? You could make an attribute type called "email" for instance, or zip, that did full on validation for that specific field type.

Getting to this point would involve a lot of work though, and there's currently only three attribute categories (user, page, and file), so we'd need another. what this would be i don't know. block? object? i haven't thought it that far through.

as far as the tableless layout, looks like someone has already done some work on that, it just hasn't made it into the core:
http://www.concrete5.org/community/forums/customizing_c5/updating_f...
synlag replied on at Permalink Reply
synlag
Attributes for blocks and groups would be nice.
Block to create or join a public group also.
At the members page, add stuff like my groups an idea?

The block could be refactored with form helper class. What'd be nice, if i could add descriptions between input tags, so i do not have to split my form block.
At the backend, letme export my form and survey to excel,csv or xml. Making this a bit generic, would allow to export any kind of lists.
glockops replied on at Permalink Reply
glockops
The college I work for is using Jotform.com as a semi-temporary (?) solution for building web forms.

If you guys could work out a deal to use that drag and drop interface, that would be more than sweet.

That being said, we also experience limitations with jotform.

Here's my wishlist for a form builder:
* Ability to specify prefill values for form fields. Specifically, php statements (maybe even the ability to pass URL variables into form fields /pagename/?Formzip=47876)
* Field validation
* Definable Help / Tooltip next to fields (?)
* Dynamic branching. (examples: if option A is selected, show B; if checked, ask the following questions; etc.)
* Being able to edit what form fields are shown by default in the reports section of the dashboard.
jgarcia replied on at Permalink Reply
jgarcia
I love your suggestions glockops. It think C5 would greatly benefit from something like this in the form of a Premium Form block/package. Of course there are web apps out there that do things like this (wufoo, formspring), but I honestly hate the idea of having a portion of my site that is very important being dependent on a service someone else is providing...what happens if that service goes away one day?

i would gladly pay $35-$55 for a really good form package that does everything these nice webapps does, but completely within c5.
bcarone replied on at Permalink Reply
bcarone
Has anyone taken a look at this php class plug-in (pear module) for integration into an advanced form package?
kino replied on at Permalink Reply
kino
frz replied on at Permalink Reply
frz
This strikes me as super hard to do, with wildly different expectations depending on who you are...

I certainly have worked for clients who would be happy with just a few more formatting controls and the ability to add some text between fields...

I've also talked to designers who want complete CSS layout control, pixel perfect positioning, inline validation, etc..

I tend to agree with Tony.. Forms are complicated when you want to get picky with them, use the custom form model to do it right by hand.. a few hours of a developer building that complicated form right from scratch is a way better investment than days of a designer messing with options in a block that tries to do too much for too wide an audience.

That being said, if you're serious about doing this I would look around the web. I know there are a number of custom form building web services companies out there that have had to deal with the problem of how to present the editing UI in a powerful yet usable way, how to store the data.. deal with logic..etc..

It would probably be helpful to see how far they were able to go/had to go in order to make a successful company around JUST this need....

Uhh.. surveymonkey.com is actually local to pdx... google has a form builder too..perhaps theres even a way to wrap their stuff and save the pain.
matogertel replied on at Permalink Reply
matogertel
I agree with Franz that if people are really going to be fuzzy with forms, they should either hire a developer or use an external form service. Still, I think the form block would benefit from a little refactoring:
- Use a better MVC model, like the modified form block tucked somewhere in the forums
- Use the new attributes model as a base for form fields.
I think those two alone will help the form block reach a new level and will make it more flexible for developers who want to use it as a basis for their own advanced version.
Just my 2 cents :-)
jgarcia replied on at Permalink Reply
jgarcia
agreed
Remo replied on at Permalink Reply
Remo
Refactoring might be cool and so is the new attributes stuff..

But when I look at the forms we had to build for our clients there are just two things we would have needed:
- text between form elements
- breaks to make multi column layouts

Adding these features should be fairly easy, even if the code is messy.

If someone is/wants to rebuild the form block - great! But otherwise I seriously consider adding two more types to the existing block as soon as I have to create another form for a customer.

Question is: Is there a developer interested in creating a completely new form block?

There's by the way another table less layout around for quite some time:
http://www.codeblog.ch/2009/07/concrete5-form-layout/...
ScottC replied on at Permalink Reply
ScottC
I think the form block is great, it works very well for what it does.

Most forms used in larger sites if you are trying to use them aside form viewing stuff in the dashboard will require a sort of defined model where you are passing or providing data in a pre-determined format to be consumed by the rest of your site/app.

Most business end game oriented sites will really only have a few forms, maybe 5 or so....so I would suggest if you need to do anything aside from reading the responses in a table that I would write out the db structure per form normalize it and all of that if you really need it and do it on a per client basis. Trying to do everything for everyone while incredibly noble just might not let you keep your sanity :)
kirkroberts replied on at Permalink Reply
kirkroberts
Found this thread while searching the web in a state of form panic...

I would gladly pay money for a form block with some more features/options. Of course, I realize that everyone will have a different wants.

The basics I'd like to see:
- clickable radio/checkbox labels
- the ability to add space or text as if you're adding another question (could attach a class to this for styling)
- wrapper around required labels for styling (not just the asterisk)
- groupable items so they can appear on one line (like first/last name, address city/state/zip)
OR
- common groupings (like jgarcia mentioned originally) ...

I know those last two options are rabbit holes, but the first few seem possible with a rewrite of how the html is spit out. Not that I'm an expert.

Tableless layout is not a primary concern.

I'm going to look into templating (or rationalizing) for now, but if an enhanced form block was in the marketplace right now I would have bought it.

Depending on the features I could imagine paying up to $50 to make my form pain go away.

By the way, this is my first c5 site and I already want to settle down and grow old with it.
Remo replied on at Permalink Reply
Remo
I totally agree with what you write and I appreciate that you're not a person who asks for more free stuff, but implementing these features is going to take a while.

If I would have to hire a programmer I'd have to pay way more than $50. Okay, I'm living in Switzerland and not China, might change a few things as well.

I once suggested that we should add a button to all the feature requests where people could enter an amount of money they are willing to pay for it.. As soon as 4 people are going to pay $50 it's more likely that a developer is going to build it.

This button doesn't exist so:

Since I won't have any time to implement these features. I'm sure that one of my companies would pay a few dollars for these features as well.

If someone is interested in implementing them, I'm sure we can find a third and maybe a fourth person who would partially pay for it..

Anyone?
Remo replied on at Permalink Reply
Remo
I think I misread something. You're willing to pay $50 for an addon.

I'd actually prefer to have a more advanced form block in the core and I'd rather pay for this than an addon..

Supporting two form blocks isn't very efficient and the current implementation needs a rewrite anyways imho.
kirkroberts replied on at Permalink Reply
kirkroberts
Right, $$$ for an add-on block. Hopefully others who are interested can vote with their support to help get the ball rolling.
I realize it would be a potentially large project (way over my head, at least).

I also think some of my basic needs might be met by a template, so if I get time I might try that out.

By the way, Remo, thanks for your articles on your site about working with c5. Very helpful!
kirkroberts replied on at Permalink Reply
kirkroberts
I know it wasn't the original intent of this thread, but in case someone else winds up here looking for a better form block they can check this out:

http://www.concrete5.org/community/forums/customizing_c5/updating_f...

A couple of others have improved the block architecture so one can template view.php and affect how the form code is produced. Tables or table-less. This addresses some of my issues nicely.
matogertel replied on at Permalink Reply
matogertel
From what I've read so far it will be pretty hard do cover everything people have been asking for in a simple to use form block. I've worked on my own super-modified-form-block for the last project I did. Will release the code when I'm back from holidays, but basically I added MVC, classes, group headings and external controllers (borrowed from the external form block). I'd like to add some kind of permissions, so that people maybe can change the options of a select, or the text of a question but not change the whole form...
Here's something for Franz and Andrew:
- What if there was some kind of c5 developers playground SVN, where we could just submit our code and let people build on it, without the supervision of the core team? Then you could take any ideas you like and release them in the official c5. Much like mozilla vs netscape ?