...
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|
Field label | Field name | Type |
---|---|---|
My Text Field | mytffield | text |
My Dropdown Field | mydropdownfield | advanced dropdown |
My Text Area | mytextarea | textarea |
Storage format
Code Block |
---|
<ac:structured-macro ac:macro-id="45a7667b-79d4-4896-9830-705af8285cb8" ac:name="confiform" ac:schema-version="1"> <ac:parameter ac:name="formName">f</ac:parameter> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="580584ec-6e33-4fb0-bc98-8f50d55cfd01" ac:name="confiform-field-definition" ac:schema-version="1"> <ac:parameter ac:name="fieldName">mytffield</ac:parameter> <ac:parameter ac:name="fieldLabel">My Text Field</ac:parameter> <ac:parameter ac:name="type">text</ac:parameter> </ac:structured-macro> </p> <p> <ac:structured-macro ac:macro-id="2a7dd6b1-30c4-4602-91eb-8753d391ddc1" ac:name="confiform-field-definition" ac:schema-version="1"> <ac:parameter ac:name="fieldName">mydropdownfield</ac:parameter> <ac:parameter ac:name="fieldLabel">My Dropdown Field</ac:parameter> <ac:parameter ac:name="values">false[1=one|2=two|3=three|4=four|]</ac:parameter> <ac:parameter ac:name="type">select2</ac:parameter> </ac:structured-macro> </p> <p> <ac:structured-macro ac:macro-id="7399797b-9c13-461b-a8eb-3a763673d5b3" ac:name="confiform-field-definition" ac:schema-version="1"> <ac:parameter ac:name="fieldName">mytextarea</ac:parameter> <ac:parameter ac:name="fieldLabel">My TextArea</ac:parameter> <ac:parameter ac:name="type">textarea</ac:parameter> </ac:structured-macro> <ac:structured-macro ac:macro-id="746fdd65-348b-4c8c-be60-b48044c67761" ac:name="confiform-entry-register" ac:schema-version="1"> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:rich-text-body> <p> </p> </ac:rich-text-body> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> |
Something like this
We will add some records into the form
Now it is time to bring in the Dynamic ConfiForms Form Filter Control macro
Here is the macro, with the default settings it takes all the fields from the form and present them in a card view. You can easily change the layout of this, see below
Warning |
---|
The macro has been renamed from ConfiForms Dynamic Filter Control to ConfiForms Form Filter Control macro |
Info |
---|
ConfiForms Form Filter Control macro supports custom layouts. If you wish to have a free text search with custom layout then add a ConfiForms Field macro inside the Filter Control macro body and set it's field name parameter to * (wildcard) |
But it does not work without a "view"... without "views" macros, such as CalendarView, ListView, TableView or CardView.
Trying to use it without a view will result in a warning message
So we need a "view"
We will use the default ConfiForms TableView
However, for TableView and CardView you *MUST* enable support for filter in macro properties
Now we can use the filter
Warning |
---|
Very important note: You have to set the type of view used with this filter in Dynamic Filter macro. We have not done it, because the defaul mode is "table" But this setting in ConfiForms Dynamic Filter macro must reflect what type of view macro you are trying to use with this filter (name of the form and page where the form is located must match in "view" and in filter) |
Here is an example using the Dynamic filter with custom layout and using it together with a ListView
Here is how it looks like on the page
Thank you for you time and reading this far. The tutorial now ends, but there is a bit more to explore in Dynamic Filter macro, such as:
You can set "views" to show nothing initially (useful for large dataset). To do this you need to write some filter which will not match anything. One to suggest is to use internal field _today and compare it agains 0
Code Block |
---|
_today:<0 |
Which is always false, as _today holds the current timestamp
More about filter can be found here: ConfiForms Filters
You can add a form reset button (setting in Dynamic Filter macro) to ease the clean up of fields to start over