I've tried to display content from a database table in an html view.
First I've build a read data function called read_teams with model name teams.
Second i've build an html view named listTeams
Third in the event index i put {fn:read_teams} and {view:listTeams}
In the html view i put {var:read_teams.teams.captain} that i read in a previous topic.
It gives no result. What am i doing wrong?
what does {var:read_teams} show ?
You will need a table view to display the data correctly
And if you are starting your Connectivity work I would recommend that you use ChronoForms7 instead!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Dear admin,
thank you for the quick respons.
read_teams is a function that retrieves all records from a database table.
I now have created also a tableview called table_teams.
Can you now tell me what the right syntax is to present the value in an html view?
There is a demo connection included and the FAQs page here shows some directions on how to do that!
But if you have sometime before using this table online then it's recommended to use v7 instead
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
sorry admin, of course i examines all the demo's but there is no demo with an html view.
I found a topic in Forums but that not solved my problem.
It's strange. In v5 its so simple. It cannot be true that in v6 its so difficult. I just started with v6.
Please help me.
I looked for v7 but in the download area there is no v7.
Hi JoCo,
Please click the Blog link above.
Bob
Sorry Bob, but what do you mean with the Blog link?
To refer to my question in this topic.
I now have a result in my html view with the following syntax: {var:tableview_name.row.model.field_name} but........
It only shows the last record in de database table and not all of the records.
What i have to do to see all the records?
Jos
Hi Jos,
At the top right corner of this page there is a Blog link where you can download the beta version of CFv7.
Bob
Oke Bob, i've got it.
and i find there also a solution for my topic?
Bob, i am i little but confused.
I go to the blog link and the only compenent i see is chronoforms v7 beta but nothing about chronocennectivity and that is what we here talking about.
But i install chronoformv7 and i will test it.
Hi Jos,
I believe that Max has included the features of CC in CFv7 so that you can build and display a table.
Bob
Hi Bob,
i downloaded v7 but without any documention its very difficult. v7 will certainly not solve my problem.
Back to the beginning: how can i create a list of table rows in an html view in a table format.
As i already mentioned with this syntax {var:tableview_name.row.model.field_name} the html view show one table with the content of the last record in the database table. With i tried to achieve is a list of separate html tables for eache database record.
So what must be the syntax to show me the hole database table content in html tables.
If you can tell me that you definitely deserve a cup of coffee.
Have you tried following the demos for CC?
Of course, non of the demo's used an html view. If you think there is please show me.
Any particular reason WHY?
If you have v7 beta3 install then you can download and install this backup file, it will show you a list of the articles on your website, you can update the form to whatever you like![file=13049]table_test_23_May_2020_17_11_47.cf7bak[/file]
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
I started with v7. It looks nice but it is the beginning.
There is an error shown in the form like: Your Global Email settings are not set, please open and configure ChronoForms7 Global Settings!
I looked for the Global Setting but i did not found it. Where i have to look ad with field is concern.
just open the v7 "settings" page then save it once!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Oke, the error is solved.
To generate a simple table is easy if you have some experience with chronoconectivity.
I placed an custom view html with an html table (see below).
I want to display the same content as i see in the table list.
This is what i tried as syntax but an empty result.
What is the correct syntax to display the content from a database table?
{var:readdata_unitname.readdate_modelname.field_name}
<table>
<tbody>
<tr>
<td>Captain: {var:read_team.voorjaar.Naam}</td>
</tr>
<tr>
<td>Email: {var:read_team.voorjaar.Email}</td>
</tr>
<tr>
<td>Telefoon: {var:read_team.voorjaar.Telefoon}</td>
</tr>
</tbody>
</table>
this is on v7 or v6 ?
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
why do you use custom HTML ? you will need to loop with PHP and print the values, there is no shortcode for that!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Oke, that is also a solution.
Yet the question remains why is that feature custom html present in chronoconnectitvityv5 and not in v7.
What is then the option in v7 to display the cells of the database table among each other and not side by side, php?.
That is why i like this feature in v5.
There is HTML node in v7 under "custom"
You need a table of field/value of a single record ? we now have a table for multiple records, that was the demo!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
I need a table of field/value of a single record (if it is possible).
Please send me a demo.
What does your debug say? Because it will show you all the data available.
If you only want one record you should be returning first matching not all matching. Otherwise, to display your only record you have there, you want {var:readdatanamehere.0.modelnamehere.fieldnamehere}
in v7, you enable the "Set Model Data" behavior in the "Read data" then you can use {var:Model.field}, but you should have the "Read data" set to select First record!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Oke thanks, the first time i see a value in v7. That works perfect.
But now, for me, the last final step, how do i display this for multiple records?
Jos (that's my forst name 😀)
For multiple records you should use the listing table, it will ask for a data source then it will show the list!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Thanks Max, i know.
The format of a listing table is :
Title1 Title2 Title3 Title4 Title5
Record1:xxxxx xxxxx xxxxx xxxxx xxxxx
Record2: xxxxx xxxxx xxxxx xxxxx xxxxx
Record3: xxxxx xxxxx xxxxx xxxxx xxxxx
etc..
But i need a listing table with this format:
Record1
Title1 xxxxx
Title2 xxxxx
Title3 xxxxx
Title4 xxxxx
Title5 xxxxx
Record2
Title1 xxxxx
Title2 xxxxx
Title3 xxxxx
Title4 xxxxx
Title5 xxxxx
etc...
Is this possible yes or no and if yes how in v7.
Build it yourself in PHP.
For this kind of list it's possible to use the HTML view, if you want multiple records then place it inside a "Repeater", your HTML view will have some code like what you have posted earlier:
<table><tbody><tr><td><strong>Naam:</strong></td><td>{var:Article.title}</td></tr></tbody></table>
if this does not work then please let us know!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Oke Max,
that's it. It works perfect with the repeater in v7.
I will mark it as "answer".
Thanks for all the effort.
Jos
No problem!
Just a note though, after any new update and until the stable release you should make sure that all the form features work as expected, also after you open the form and save it, this is because some small changes are made, like a setting name or whatever
For example, the new update will unset the "Set Model data" behavior in your "Read data", and will change few fields events names, so if you use any of these then make sure you set them again!
Best regards
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?