Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Refactor of Form Library #115

cliftonc opened this Issue · 4 comments

4 participants


The form library is a crucial part of Calipso, it allows both rendering and processing of forms in an extensible way, allowing forms to be defined, altered etc. programmatically (you can't do this if you leave forms purely in HTML).

It also ensures consistency and allows theming of forms.

Comments from conversation with Dennis:

I've been looking at my favorite part of the code - Forms.js. I feel like form elements need to be a little more organized. Case in point, I'd like the supported "form element types" to be more discoverable.

I'm several hours into a major Forms.js rewrite. The good news is - I think I can keep it fully or at least mostly 'backwards compatible'.

This rewrite is to pave the way for me to write my cherished cck module, based on your 'new content type' > "Custom Fields" work. I aspire to make calipso's "new content type" into a wizard similar to wufoo.

"old way":
form : { sections: [], fields: [], buttons: [] }

"new way":
form : { fields: [ { type: section, children: [] }, { type: section, children: [] }, { type: buttons, children: [] }

I wrestled with making the refactor more severe, by moving tag attributes into an "attr" property per field in the json. It's still something that might need to be done eventually, for more explicit--and more fool-proof and 'future-proof' (extensible)--definition of tag attributes.

I still need to work out whether or not to use CalipsoForm.prototype.method = ... everywhere, and then start adding some composite and custom field types, like address and email.

@dennishall dennishall was assigned

Just an update to that last part - no need to take an early glance there, it's in the devel branch of calipso now (and updates will happen there).


Updated so we don't confuse anyone :)


Hey! What about field validators? Does calipso already have it? Or maybe it will be good idea to integrate it with forms api?

p.s. I'm newbie here and searching for some docs of calipso. I wanna to help with development and make blog for myself.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.