08815aa574ee792fdaf7755d74c7fc687dfa019e
Guides/ReportDesign/14.0-Izenda-FORMS.md
| ... | ... | @@ -169,6 +169,7 @@ Second, you must place a container div with the id 'launchmeplease' inside the s |
| 169 | 169 | |
| 170 | 170 | This example script generates a custom date format: |
| 171 | 171 | |
| 172 | +```html |
|
| 172 | 173 | <!--FORMSCRIPT--> |
| 173 | 174 | <div id="launchmeplease"> |
| 174 | 175 | var d = new Date(); |
| ... | ... | @@ -179,10 +180,13 @@ var fullDate = currMonth + "-" + currDay + "-" + currYear; |
| 179 | 180 | jq$(".myCustomDate").html(fullDate) |
| 180 | 181 | </div> |
| 181 | 182 | <!--FORMSCRIPT--> |
| 183 | +``` |
|
| 182 | 184 | |
| 183 | 185 | Once the date object has been created, we pull out various aspects of it and combine them to create our custom value, here named 'fullDate'. We then use jquery to find all divs of the class 'myCustomDate' and replace the inner text with the value of fullDate. On our form, we would then place a div wherever we want a custom date: |
| 184 | 186 | |
| 187 | +```html |
|
| 185 | 188 | <div class="myCustomDate">You should not see this!!</div> |
| 189 | +``` |
|
| 186 | 190 | |
| 187 | 191 | The text inside the div, 'You should not see this!!', is error text that will appear instead of the date if something goes wrong. |
| 188 | 192 |