CC V4 RC2 fields in the header

bighen 13 Apr, 2012
Hi,
I'm trying to create nice custom listing of 1-to-many record set.
Like:

school_id school_name class_id class-name
1 Windsor Primary School 101 1a
1 Windsor Primary School 102 1b
1 Windsor Primary School 103 1c
1 Windsor Primary School 104 1d
1 Windsor Primary School 105 1e
2 Oxford Primary School 107 1z
2 Oxford Primary School 108 1b


I want to put the field (school_name) from main table in the header, but it does not work.
Ok, the problem is which record to pick to take the value
But with the filter 'school_id = 1' I have only one school_name.

First: is this by design that {field_name} does not work in the header ?
Second: I could see the data grid in the debugger display, so I could use PHP
to create proper header, though I did not find the name of the array debugger shows... What is the name? I don't want to waste my time debugging the scripts...

Regards
Henryk
GreyHead 13 Apr, 2012
Hi Henryk,

Sorry I don't understand your question - what do you want to have in the Header row? It doesn't make any sense to me to put an individual School name there.

And, yes, {field_name} only makes sense in the Body section of a listing.

Bob
bighen 18 Apr, 2012
Hi Bob,
It does make sense.

The example table shows not-filtered record set.
For particular school I've got the same school name in all records of the query.

Anyway the engine processes the body section so why not to let it go through all sections...

Henryk
GreyHead 18 Apr, 2012
Hi Henryk,

Anyway the engine processes the body section so why not to let it go through all sections...

Because normally the field will have a different value for each row in the table so there isn't any particular value that makes sense in the header.

If you've used the school name as a filter then that value may well be available in the Header box. It was in CCv2; I don't know if the same is true in CCv4.

Bob
Max_admin 24 Apr, 2012
Hi Henryk,

Currently the records list can be found in the header under:

$form->data['connection_data']
OR
$form->data['MODEL_ID']


I don't think this was included in RC2 so you may need to wait for RC3, I'm doing my best to finish it ASAP, hopefully by Thursday or so.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Bullfn33 24 Sep, 2013

Currently the records list can be found in the header under:

$form->data['connection_data']
OR
$form->data['MODEL_ID']


Is this still the case? I tried the above and did not get anything to show up. I need to add the username of the user's data I have listed in the header box.

In the header box I tried
<?php echo $form->data['U']['username']; ?>


FWIW, I added U.username to the List View Fields box in Frontend List Setting > General tab.
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger