jQuery Form Builder 0.4

I need to write an extension application on top of my popular jQuery Form Builder plugin so I finally took the time necessary to perform some long-wanted updates. The xml-based form loading system is finally gone, replaced by a pure JSON solution. There’s a lot more code cleanup, some bug fixes, and now some sample MySQL integration in addition to existing static data loading examples.

The extension layer I’m working on will add functionality for building basic quizzes and scoring them, and hopefully, some MongoDB support. When completed I’ll push that functionality as well. But for now, I need your help in testing the changes in 0.4.

As usual, source code and downloads are on GitHub.

Sizing Text to Container with jQuery ExpandText

A frequent problem with text on the web is that there’s no way to automatically adjust the font size based on the dimensions of it’s containing element – at least in a way that changes size when the container does.

(more…)

jQuery Form Builder Plugin

Trellis Development (a parent company of web-based products which I co-founded) has been developing a custom content management system which needed a form creation tool. I adapted a form builder that I created for a previous project as a jQuery 1.3 plugin. It loads in existing form structure data through an XML file (which would be generated on the server) and passes the changes as a serialized array back to the server.

View the Demonstration
Get source from github

I’ve forked the code from the cms to serve as a stand-alone plugin. It’s extremely easy to setup, as all you need to do is to activate it on an un/ordered list item element. Then, write your backend code to handle the incoming array as you need, and output the xml data for when the form loads.

<ul id="form-builder"></ul>
$(document).ready(function(){
	$('#form-builder').formbuilder({
		'save_url': 'save.php',
		'load_url': 'form-a.xml'
	});
});

The save_url is the url that the ajax will be sent to when the user saves the form. The form information is serialized so that the backend programming may handle it as an array.

The load_url is the url of an xml file that describes any existing form information, and the system uses it to restore the fields.

This requires jQuery 1.3+ and uses the scrollTo plugin for nice scrolling.

Please report all issues and feature suggestions at https://snowy-evening.com/botsko/jquery-form-builder/

This is the first revision that’s external to our cms so I’ve labeled it 0.1.

jQuery Serialize List Plugin

During several recent projects I needed the ability to serialize an unordered list and pass it back to the server. A google search didn’t reveal much and I didn’t want to go digging this functionality out of larger plugins like sortable, UI, etc.

I decided to wrap it all up into a jQuery plugin so that it’s easier to use in different projects. The serialized un/ordered list may be sent back to the server, and for example in PHP, will be interpreted as an array.

You may use this plugin by simply calling it on your UL or OL.

$(document).ready(function(){
    $('ul').serializelist();
});

You may download the most recent version directly from github:

http://github.com/botskonet/jquery.serialize-list