-
Notifications
You must be signed in to change notification settings - Fork 2
Formatter
lallysmbc edited this page Dec 15, 2020
·
5 revisions
Provides Formatting to Tag Parsers
Formatter | Output |
---|---|
full-date | Thursday 1 December 2020 |
time-only | 7am or 12:30pm |
Displayed the question dateValue
with the full-date formatter
{
"Type": "p",
"Properties": {
"Text": "The selected date is {{QUESTION:dateValue:full-date}}"
}
},
This is the same as writing dateTimeObject.ToString("dddd d MMMM yyyy")
eg. {{QUESTION:variable-key:full-date}} Output => "Thursday 1 December 2020"
This is the same as writing dateTimeObject.ToString("h:mmtt") or dateTimeObject.ToString("htt"), depending on if there are minutes to display or not. This will display in lowercase.
eg. {{QUESTION:variable-key:time-only}} Outout => "7am", "12pm", "12:30pm", "5:45pm"
in form-builder/src/TagParsers/Formatters/ add a class
public class YourFormatter : IFormatter
{
public string FormatterName { get => "your-string-identifier"; }
public string Parse(string value)
{
return value.WithSomeFormatting()
}
}
- Availability
- Actions
- Behaviours
- Breadcrumbs
-
Conditions
- String Conditions
- Date Conditions
- Integer Conditions
- File Upload Conditions
- Custom validation
-
Elements
- AddAnother
- Address
- Button
- Booking
- Checkbox
- Date Input
- Date Picker
- Declaration
- Document Download
- Document Upload
- File Upload
- H1-H6
- HR
- Image
- Inline Alert
- Link
- Map
- Multiple File Upload
- OrderedList
- Organisation
- P
- Radio
- Select
- Street
- Summary
- Success page
- Textarea
- Textbox
- Time input
- Unordered List
- Uploaded files summary
- Warning
- EnabledFor
- Feedback form
- File uploads
- Form Schema
- Header
- Inbound Values
- Integrating with PowerAutomate/0365
- Lookup
- Page
- Payment & Payment calculations
- Preview data structure
- Render conditions
- Reusable elements
- Structure tests
- Success page
- Tag parsers
- Target mapping
- Validators