It can be tempting to modify the source code of a form definition. But this can be dangerous! The following simple guideline applies:
Any code which is added to a form definition, and which could not be generated by Form Builder itself, is not guaranteed to be compatible.
The exception is anything that is documented in the Orbeon Forms documentation, for example the action syntax.
With Orbeon Forms 2017.2 and newer
The "Edit Source" button under the "Advanced" tab in the toolbox opens the "Edit Source" dialog.
With Orbeon Forms 2017.1 and earlier
The "Edit Source" icon in the top right corner of the form area opens the "Edit Source" dialog.
Edit Source button
This is an advanced feature and it must be used very carefully.
Form Builder uses XHTML+XForms as form definition representation. The format must be well-formed XML. The dialog shows a text editor containing that representation.
It is possible to edit the XML representation in the dialog, or to copy/paste it to an external editor for further changes. After saving changes from the dialog, those are immediately taken into account by Form Builder.
NOTE: You have to be cautious when doing so because it is possible to break the form by making changes! We recommend that you learn about XForms before making such changes.