Multi record elements - listing in separate columns

4 posts by 2 authors in: Forums > CMS Builder
Last Post: February 22, 2012   (RSS)

By Kittybiccy - February 20, 2012

Hi guys,

I have this test page:
http://www.mercerdesign.biz/work/index.php

I've created a multi record editor for each individual to add in their work lists. The left column displays one field and an upload field for each record.

I would like the right hand column to then display further fields from each records which are displayed as one combined list not separated per record ie. all of the 'incoming jobs' for each record displayed as a list followed by all of the 'at printer' entries.

When I move around the endif's it causes problems with how everything is displayed and displays the entries not grouped together but repeating by the number of records.

Is what I want possible? Any suggestions?
Thanks.

Re: [Kittybiccy] Multi record elements - listing in separate columns

By Jason - February 20, 2012

Hi,

Where are "Incoming Jobs" records being stored? If there are coming from the same table as the records in the left hand column, how are these records distinguished from others?

If you could provide some extra detail and attach a copy of your .php page, I can take a closer look for you .

Thanks,
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Kittybiccy] Multi record elements - listing in separate columns

By Jason - February 22, 2012

Hi,

Okay, I see. What you can do is create a variable that will store all of the incoming_job field values. You can then output this list using a separate foreach loop.

First, we need to get all of the incoming job values:

// load records
list($work_listRecords, $work_listMetaData) = getRecords(array(
'tableName' => 'work_list',
));

$incomingJobs = array_filter(array_pluck($work_listRecords, 'incoming_jobs'));


After that, we just need to output the values stored in $incomingJobs:

<strong>Incoming Jobs:</strong> <br />
<?php foreach ($incomingJobs as $job): ?>
<?php echo $job; ?> <br /?>
<?php endforeach ?>

<hr />


You can use this same technique for your other fields as well.

Hope this helps get you started.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/