Forums

Adding a filtering function to my table generated by CC6

MTUG 30 Mar, 2020
Hey,

Im working with building a website that contains information about different medica projects. The medical projects are added to a database using a form created by chronforms. Thereafter all projects are displayed in the website by a table created by chronoconnectivity. see the pictures below:





I want to create a filter function to all the headers. So i want to make it possible to view for example only CT projects or only Paused projects.

I should also mention that i have only been working with joomla, CF6 and CC6 for approximately one week. So a detailed explanation is appreciated.
healyhatman 30 Mar, 2020
Answer
In your read data action, add some conditions, e.g. columnname = {data:fieldname}, and set the dropdown to "continue" as in "if it's not entered in, ignore it"
Create a Form Area, put the fields you want in there, have it submit to the index event.
MTUG 30 Mar, 2020
Thanks for your answer.
I've added a 'conditionä in my read data action. looks like this:



I've also created a form area. but i dont understand how i should fill the fields.

healyhatman 30 Mar, 2020
Now create a text field and put it inside the Form Area's "content" section using {view:name_of_your_text_field}

And don't literally write "columnname" in the read data where condition, write the name of the column you're going to use that text field to filter on
MTUG 30 Mar, 2020
I did create the text field and put it in the Form Area's content. The result is i did get a field on the webpage ( see image below) but when i type CT for example to filter only CT projects i didn't get any response.

more screenshots on attachment[file=12855]events.png[/file]
​[file=12856]functions.png[/file]
​[file=12858]views_modalitet.png[/file]
​[file=12859]views_form3.png[/file]
​[file=12860]views_table1.png[/file]
healyhatman 30 Mar, 2020
Did you submit the form, or just type in it?
MTUG 30 Mar, 2020
I typed and pressed Enter
healyhatman 30 Mar, 2020
And it's submitting? What does your debug say?
MTUG 30 Mar, 2020
I would say it is submitting cause i get a loading logo after i press enter. but the tabell won't update.

I don't really know about debug. Sorry i'm very new to this.

In 'Functions' 'Condition' the value should it be data.modalitet ? or should data be replaced by my database name?
MTUG 30 Mar, 2020
I did write:
{function:read_projects}
{view:form3}{debug:}
{view:table1}
In the events and i got:


Does it tell you anything?
MTUG 31 Mar, 2020
I figured it out. i should have data.modalitet to data.text4
because the textfield i've created called text4

Thanks for help!:)
MTUG 01 Apr, 2020
My next challenge would be to add an edit button to my project list(see picture below):


so the idea is: The user should be able to search for a project (or projects) and can simply edit the project (for example change the status) by clicking on the edit button.

can you help me with that:)
healyhatman 01 Apr, 2020
There are demo connections that can help you with that.
MTUG 02 Apr, 2020
Hi again,

Thanks for your answer. I've been looking at the demo connections. There is something i dont understand.

In the demo connection there is an edit button, when i press edit. The title of the article that i have chose to edit is already written in the text field. what is the function that does that? i have tried to build my connection in the same way but the when i press edit i get en empty form ( see pictures below).



This is build with with demos 'basic articles list'. When i click on edit i get the following widnow where article title is automaticly filled.



Also, can i make so when i click edit i get my already designed chronoform with the informations of the specifik project so i can edit multiple lines?
Max_admin 24 May, 2020
do you still need help with this ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
MTUG 25 May, 2020
No I've figured it out.
Thank you!
Max_admin 25 May, 2020
Great, we are making ready the new ChronoForms v7 which has an easier to use data listing features, so in the future you better use it instead of CC6

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
rafaelscouto 29 Oct, 2020
This worked very well for me, but how can I use a dropdown instead of the text field?
Max_admin 30 Oct, 2020
if your dropdown has the same field name then it should work the same!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.