lonnieezell / Bonfire

Jumpstart your CodeIgniter web applications with a modular, HMVC-ready, backend.
http://cibonfire.com
1.39k stars 526 forks source link

Idea: field types / forms - in module builder #607

Open leerlemoniii opened 11 years ago

leerlemoniii commented 11 years ago

Seems like it would be cool to add some javascript codes (similar to what is done with the textarea fields) that create other types of fields. for example: Date chooser, color picker, file upload utilty (may be more intensive).

also think it would be cool if there was a utility that made it easy to add additional validations for example: valid phone, valid zip (+4), transform first letter to Capital, password check strength (or similar),

I just find myself spending a lot of time adding these kinds of things to the modules, and think others must be as well, and this could save a ton of time if they were built in.

lonnieezell commented 10 years ago

You're right - those things would be awesome. And I've toyed with a little bit of that when starting work on a rewrite of the builder, but I haven't been able to get very far in it, unfortunately.

If you've done this sort of thing already, do you have code that you could fairly easily integrate into the builder and send a pull request for any of these items?

mwhitneysdsu commented 10 years ago

I am considering an overhaul on the module builder and went through and tagged most of the issues that hadn't already been tagged. I didn't realize it would pull the issues back up to the top.

I know we have the password checks in the form of some javascript that can be enabled on the user form, but I'm not sure how portable it is.

Phone and postal code validations are difficult at best, because of variations between countries and use of extensions or letter substitution in phone numbers. Then there are the format variations people use to indicate the different parts of the phone number (e.g. +1 (800) 555-CALL x1234, 1-800-555-2255 ext. 1234, or 800.555.2255 -1234 could all refer to the same phone number). Additionally, I run into a short-hand for on-campus phone numbers in which the area code and the first 2 digits of the remaining 7 are omitted, because the campus phone system permits dialing the last 5 digits to reach any on-campus number. Of course, most people type the 5 digits together (12345), but some still include the separator (1-2345).