Difference between revisions of "XML Section Builder"
From SmartWiki
m (→Builder: "Node names must not be blank, must not contain spaces, and must not be a number" - node names are picky!) |
(→Builder: - added some Cell Properties info) |
||
Line 11: | Line 11: | ||
* The formula can refer to other cells within the section using the following syntax: | * The formula can refer to other cells within the section using the following syntax: | ||
* <font size="2">'''[row#,column#]'''</font> | * <font size="2">'''[row#,column#]'''</font> | ||
− | Example | + | Example: |
[1,1]+[1,2] | [1,1]+[1,2] | ||
* The formula can refer to fields in other sections using the following syntax: | * The formula can refer to fields in other sections using the following syntax: | ||
Line 17: | Line 17: | ||
Example: | Example: | ||
=[@section.InternalFunding.id@_Total_Amount]/[@section.TotalFunding.id@_Total_Amount]*100 | =[@section.InternalFunding.id@_Total_Amount]/[@section.TotalFunding.id@_Total_Amount]*100 | ||
+ | |||
+ | Click on a cell in the section for the '''Cell Properties''', each cell has the following properties: | ||
+ | |||
+ | * ''Type:'' this is the type of cell, (Single Line Text, Multiple Line Text, Display Only Text, Select One Combo Box) | ||
+ | * ''Content:'' Text to display in the cell or formula for calculations (Examples: ''Total'' or ''=[1,2]+[2,2]'' or ''=[35_Total_Amount]+[36_Total_USD]'') | ||
+ | * ''Cell CSS Class:'' Add CSS class to the table cell | ||
+ | * ''Input CSS Class:'' Add a CSS class to the input field | ||
+ | * ''Input Attributes:'' Add HTML attributes to the input field (Example: ''name, size'') | ||
+ | * ''Validation Script:'' Script to validate the input field (Example: ''[this]>100'' or ''[this]==[35_Total_Amount]'') | ||
+ | * ''Validation Message:'' Alert when validation script is not true (Example: ''This value must be greater than 100'') | ||
==Template== | ==Template== |
Revision as of 10:52, 9 January 2013
The XML Section Builder can be used to create XML templates without knowing advanced HTML or XML.
To enable:
- Select the Enable Builder checkbox on the custom field settings page and click Save.
- Click the Section Builder button at the top of the page to enter the builder.
Builder
- Node names must not be blank, must not contain spaces, and must not be a number.
- CSS classes specified can either be the system defined classes, or you can create your own CSS classes and include them in the <style> tag on the Template
- The formula can refer to other cells within the section using the following syntax:
- [row#,column#]
Example:
[1,1]+[1,2]
- The formula can refer to fields in other sections using the following syntax:
- [@section.yoursectionname.id@_rowname_colname]
Example:
=[@section.InternalFunding.id@_Total_Amount]/[@section.TotalFunding.id@_Total_Amount]*100
Click on a cell in the section for the Cell Properties, each cell has the following properties:
- Type: this is the type of cell, (Single Line Text, Multiple Line Text, Display Only Text, Select One Combo Box)
- Content: Text to display in the cell or formula for calculations (Examples: Total or =[1,2]+[2,2] or =[35_Total_Amount]+[36_Total_USD])
- Cell CSS Class: Add CSS class to the table cell
- Input CSS Class: Add a CSS class to the input field
- Input Attributes: Add HTML attributes to the input field (Example: name, size)
- Validation Script: Script to validate the input field (Example: [this]>100 or [this]==[35_Total_Amount])
- Validation Message: Alert when validation script is not true (Example: This value must be greater than 100)
Template
Within the XML Field template you can pull the sections you have created using the following syntax:
- @section.sectionname@
Example
<table> <tr><td>Revenue</td></tr> <tr><td>@section.Revenue@</td></tr> <tr><td><br>Expenses</td></tr> <tr><td>@section.Expenses@</td></tr> </table>