Fields list in Views type Details List not working

vdneut 30 Jan, 2023
Instead of using the 'Inlude all provider fields" option I would like to use specific Model.field:Label pairs in the Fields list in Views type Details List.
So, turned off option 'Inlude all provider fields" and then added some fields in the Fields list, like:

The result is a page with the lables, but no values.
I tested the Demo: Article relations demo, out of the box and also that one does not work. It should show: title:<div class="ui label red">Article title</div>
But it doesn't.

My conclusion would be, there's something wrong with the Details List view type.
But if there's something that I do not understand or made a misstake, please let me know how I can solve it.

Kind regards,
gix.vax 30 Jan, 2023
Is your data provider ok?

event name index
{fn:read_article} (you must create this in function, read article table and have model called Article)

name: my_list
data provider : {var:read_article}
field list

in function
create a database read called "read_article" with model named Article
vdneut 31 Jan, 2023
Thanks, this helped to solve it.

In terms of your example, I had an extra reference to the model in the data provider

name: my_list
data provider : {var:read_article.Article}
field list

Once I removed the reference to the model, it worked.
Why it worked? I have no idea, as the model reference can be used. I stole it from the 'Article relations demo', View, article_details, data provider field.
Even more bizar, If you remove the .Article part in the demo, it breaks.

I will study some more on CC6...

Thanks again and regards,
gix.vax 02 Feb, 2023
yes, data provider is the entire read_data not the model of the read data
Is in list that you point to model_name.fieldname

some tricks
if you want to ponit to a filed in a row of a list (with a button in the row for example) you have to use the synthax

pay attention
if you modify your table in mysql (or db you are using) and sometimes when you modify your model
use the "clear cache"function of chronoforms and CC6 (both)

You can find clear cache on top of list of your CC6 and CF6 forms, (click on three dots icon to show menu item clear cache)
vdneut 03 Feb, 2023
Thanks for the extra tips & tricks. Goes into my small manual.
You need to login to be able to post a reply.