Welcome Guest, Not a member yet? Register   Sign In
Buliding CodeIgniter App - Need advice on XFORMS


I am building an application, and one of the requirements is to use XFORMS not HTML Forms. Can anybody advice on how to implement XFORMS in CodeIgniter.

Thanks guys!

First, you should use a client-side XForms implementation. You might use the Mozilla extension or an AJAX based solution such as XSLTForms (http://www.agencexml.com/xsltforms).

HTML Table Class is not compatible with the MVC approach in XForms, the Form Validation Class neither...

If you want the browser to parse xforms i guess it will be nothing more than putting the xform markup in the view files. I'm not sure if the markup can be parsed if it's embedded in text/html outputted content.

The second obstacle is i don't think all browsers support native xform, some don't even support the current css specifications. So you need a severside parser removing a great feature of xforms, the event handlers, as the serverside parser will output an html form.
For CI it means if you have a serverside parser you have to load that library and bind the output to the master view if there is one or use a serverside parser that catches the forms in the views directory and it has a method that can output the cache file.
// output to master view example
$data['content'] = $this->xforms_parser->to_html('some_form.xml')->get_rendered_content();
// cached output example

Theme © iAndrew 2016 - Forum software by © MyBB