10.2.2 Creating the form
10.2.2.1 Creating the Kauri form by giving the id to the Form constructor
When configured the form, all that rests is to create the form by calling the Form constructor with 2 arguments:
- the id of the form in html
- the fconf (form configuration) we created above
jQuery(document).ready(function() {
var basicForm = new jQuery.org.kauriproject.forms.Form("basic-form", fconf);
});
And the html for this form looks as simple as this:
<form id="basic-form" method="get" action="" >
</form>
10.2.2.2 Creating the Kauri form with jQuery
Another possibility is to create the form in jQuery and passing this jQuery wrapper to function kauriform:
var basicForm = $("<form/>").appendTo($("div#someId")).kauriform(fconf);
Previous