Friday, October 12, 2012

Better In-Browser Code Editing in Form Builder

Form Builder is all about enabling form authors to create forms with a web-based tool, without having to write code. But then, in what format are the forms you create with Form Builder saved? Is it similar to when editing a document in Word, where your document is saved in a mostly opaque “Word format”? It isn’t: you forms are saved in XForms[1].

Using a standard[2], human readable, easily transformable format has lots of benefits. And we want to enable those of you who wish to do so, to go one level deeper: to be able to view and edit the XForms, directly in Form Builder. And this is why, the Form Builder code editor in the upcoming Form Builder 4.0[3] has been improved to do syntax highlighting, help with code indentation, highlight syntax errors, and more. We do all of this by leveraging the excellent CodeMirror component.

CodeMirror screenshot
CodeMirror screenshot

  1. Or, to be more precise, forms are saved as XML in XForms+HTML+Form Runner, where the latter is used for higher level constructs that have no equivalent in HTML or XForms, such as section or grid.  ↩

  2. Modulo the Form Runner tags, which are specific to Orbeon Forms.  ↩

  3. At the time of this writing, Orbeon Forms 4.0 hasn’t been released yet, but you can already experiment with Orbeon Forms 4.0, including the updated source code editor, by using a 4.0 milestone build.  ↩

No comments:

Post a Comment