Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

This is a page to show how to use ConfiForms Filters by example

ConfiForms filters is the core component of the app and is used absolutely everywhere where you need to describe a condition, filter the dataset or setup the behaviour (field and IFTTT rules)

In this example we will be more focused on filtering the data, but will also touch the basics of a conditionally applied rules

Let's consider these forms that will, logically, build the bookshelf. Each book can be taken for reading and returned when ready. We will have a form for storing this state and couple of forms to store the data about the book and the author(s)


ConfiForms Form Definition
formNamebookshelf
registrationFormTitleBookshelf

bookBook[52626037|books|title|true||]smartselect2

statusStatusfalse[avail=Available|taken=Taken|lost=Lost|]select

takeBookTake bookstatus=taken&takenBy=[entry._user]action_buttonPlease dont forget to return the book after you read it

returnBookReturn bookstatus=availaction_buttonThank you for returning the book

takenByTaken Byuser

*takenByHide field

bookshelfstatus=availRegister book at bookshelfINLINE


ConfiForms Form Definition
formNamebooks

titleTitletexttrue

authorsAuthors[52626037|author|lastName|true|false|[entry.lastName], [entry.firstName]]smartmultiselect

booksRegister bookINLINE


Create ConfiForms EntryonCreatedbook=[entry.id]&status=availbookshelf:@self


ConfiForms Form Definition
formNameauthor
registrationFormTitleAuthors

firstNameFirst nametexttrue

lastNameLast nametexttrue

dobDate of Birthsimpledatetrue

authorRegister authorINLINE






All books

Table Filter
id1578307673675_52690193
ConfiForms TableView
messageToShowWhenEmptyNo books registered yet
formNamebookshelf
showRecordsCountLabelBooks registered in the bookshelf:

book

status

Code Block
No filter, showing all books in the bookshelf

Taken by me

ConfiForms TableView
filtertakenBy:[entry._user]
messageToShowWhenEmptyYou have not took any books yet
formNamebookshelf

book

status

returnBook

<hr>

Code Block
takenBy:[entry._user]

The* - Will match the record(s) where the field "title" value starts with "The" text

ConfiForms TableView
filterbook.title:The*
messageToShowWhenEmptyNo books found
formNamebookshelf
showRecordsCountLabelBooks found:

book

status

Code Block
book.title:The*

*s - Will match the record(s) where the field "title" value ends with "s" text

ConfiForms TableView
filterbook.title:*s
messageToShowWhenEmptyNo books found
formNamebookshelf
showRecordsCountLabelBooks found:

book

status

Code Block
book.title:*s