4be6b7f539fab91416f077a7a9f5ea4f537d671d
Guides/ReportDesign/14.0-Izenda-FORMS.md
| ... | ... | @@ -104,9 +104,25 @@ Caution is recommended when designing nested sub-reports and forms. When you ca |
| 104 | 104 | |
| 105 | 105 | The flexibility of nesting reports and forms is most desirable for many small cases, in which sub-reports only exhibit a very small performance hit. Complex or multi-level nested reports may experience significant performance issues; in these cases it is best to find a way to achieve your goal without using sub-reports. |
| 106 | 106 | |
| 107 | -### Repeater Tag |
|
| 107 | +### Smart Tags |
|
| 108 | 108 | |
| 109 | -**_Note: In order for repeater tags to persist, they must be in a comment tag_** |
|
| 109 | +#### Date |
|
| 110 | + |
|
| 111 | +The Date smart tag allows the user to place a timestamp on the form. This timestamp will be the current system time as of the moment the form is rendered. |
|
| 112 | + |
|
| 113 | +#### Subtotals and the @Subtotal decorator |
|
| 114 | + |
|
| 115 | +Subtotals are used in conjunction with repeaters on forms to generate subtotals of a repeated numeric column. In order to use @Subtotal, you must do these things: |
|
| 116 | + |
|
| 117 | +1) Every field _outside_ of the repeater block must be visually grouped. |
|
| 118 | +2) The "Add Subtotals" checkbox must be checked. |
|
| 119 | +3) The field you wish to subtotal is added to the beginning of the @Subtotal decorator. For example, [LineItemTotal@Subtotal] |
|
| 120 | + |
|
| 121 | +The @Subtotal decorator can only be used once. It must be placed _outside_ of the repeater being subtotaled, but _inside_ of any other repeaters. If we think of repeaters as being 'levels', then the @Subotal must be placed one level up from the fields which it is totaling. |
|
| 122 | + |
|
| 123 | +#### Repeater Tag |
|
| 124 | + |
|
| 125 | +**_Note: In order for repeater tags to persist in between the elements of an HTML structure such as a table, they must be in a comment tag_** |
|
| 110 | 126 | |
| 111 | 127 | If you have content that you want to repeat within a form, you don’t need to use a nested sub-form. By enclosing this content with the ``[repeater]`` tag, the forms engine will repeat that content until it is exhausted. |
| 112 | 128 | |
| ... | ... | @@ -160,22 +176,43 @@ And this is an incorrect use: |
| 160 | 176 | |
| 161 | 177 | [/repeater] |
| 162 | 178 | ``` |
| 179 | +##### Repeater Smart Tags |
|
| 163 | 180 | |
| 164 | -### Subtotals and the @Subtotal decorator |
|
| 181 | +Repeaters take three different forms: |
|
| 165 | 182 | |
| 166 | -Subtotals are used in conjunction with repeaters on forms to generate subtotals of a repeated numeric column. In order to use @Subtotal, you must do these things: |
|
| 183 | +```html |
|
| 184 | +[repeater], <repeater>, and <div class="iz-repeater"> |
|
| 185 | +``` |
|
| 167 | 186 | |
| 168 | -1) Every field _outside_ of the repeater block must be visually grouped. |
|
| 169 | -2) The "Add Subtotals" checkbox must be checked. |
|
| 170 | -3) The field you wish to subtotal is added to the beginning of the @Subtotal decorator. For example, [LineItemTotal@Subtotal] |
|
| 187 | +All are nearly identical, the only difference is how and when they are used. |
|
| 171 | 188 | |
| 172 | -The @Subtotal decorator can only be used once. It must be placed _outside_ of the repeater being subtotaled, but _inside_ of any other repeaters. If we think of repeaters as being 'levels', then the @Subotal must be placed one level up from the fields which it is totaling. |
|
| 189 | +[repeater] and <repeater> are functionally the same. They will repeat anything inside of them, including HTML content. [repeater] will be shown on the form designer, outside of source mode. It should be used when your form uses little or no HTML elements such as tables or div structures, and allows a user to see where a repeater is being placed in a basic word document. <repeater> functions identically to [repeater], with the exception that it is only visible in source mode on the designer. <repeater> is generated by the use of the repeater smart tag in the forms designer. |
|
| 190 | + |
|
| 191 | +The class iz-repeater is placed when an HTML element such as a div is selected using the 'add repeater to element' smart tag. This permits report designers to add or remove repeaters from HTML elements without entering source mode. Although the class is applied to an element, it functions identically to other forms of the repeater tag. |
|
| 192 | + |
|
| 193 | +So all three of these uses of the repeater tag produce identical output: |
|
| 194 | + |
|
| 195 | +```html |
|
| 196 | +[repeater]Some content![/repeater] |
|
| 197 | + |
|
| 198 | +<repeater>Some content!</repeater> |
|
| 199 | + |
|
| 200 | +<div class="iz-repeater">Some content!</div> |
|
| 201 | +``` |
|
| 202 | + |
|
| 203 | +### Adding inline CSS to a Form |
|
| 204 | + |
|
| 205 | +To add CSS to a form inline, you must use the <!--FORMSTYLE--> tag. We do not close the formstyle tag, we simply place it again to end the style block. |
|
| 206 | + |
|
| 207 | +_NOTE: Best practice is to add CSS to the CSS box on the Style tab of the report designer!_ |
|
| 208 | + |
|
| 209 | +Using <!--FORMSTYLE--> permits a user to add CSS to the body of a form. It functions the same as the style tag in HTML. However, the best location to place CSS for a form is in the CSS box on the Style tab. This is because an Izenda Form is simply a custom HTML template used to render an underlying Izenda report, which is technically a different object. This report object can have its own CSS, inherited from the environment or other custom settings, which may conflict with or override the CSS on a form. Any styling placed in the CSS box will be placed in the master style tag of the report itself, which will devolve to and be accessible within the form. It may be useful to write CSS inside of the formstyle tag for testing and debug purposes, then move all of this styling to the CSS box for production. |
|
| 173 | 210 | |
| 174 | 211 | ### Adding inline Javascript to a Form |
| 175 | 212 | |
| 176 | 213 | To add javascript to a form inline, you must do two things. |
| 177 | 214 | |
| 178 | -First, you must place your script inside the <!--FORMSCRIPT--> tag. |
|
| 215 | +First, you must place your script inside the <!--FORMSCRIPT--> tag. We do not close the formscript tag, we simply place it againt to end the script block. |
|
| 179 | 216 | |
| 180 | 217 | Second, you must place a container div with the id 'iz-custom-js' inside the script tag. |
| 181 | 218 |