Field Label values

3 posts by 2 authors in: Forums > CMS Builder
Last Post: April 12, 2011   (RSS)

Re: [rcrofoot] Field Label values

By Jason - April 12, 2011

Hi Rick,

Just to clarify, in your section you have an upload field called presentations which has a field label of "Presentation Templates". When outputting these records, you want to output "Presentation Templates:" before outputting the first one. Is that right?

If so, there is no simple way of accomplishing this, since field labels are not actually stored in the database. All of the records you have in $record['presentations'] is actually coming from the uploads table, not the same table that your field is in.

There are a couple of options for you to get around this:

1) Since we know all of these uploads are coming from the same field and will therefore have the same field label, we can just hard code in that value.
echo "Presentation Templates: <br/>";

2) The other option would be to add "Presentation Templates" to the "Title" of each upload. You can then output that value through code using the "info1" field like this:
echo $upload['info1']. ":<br/>";

Hope this helps
---------------------------------------------------
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: [Jason] Field Label values

By rcrofoot - April 12, 2011

Thanks Jason...I kind of suspected something like that...

I ended up just hardcoding the values, but I like your idea about entering into 'info1'...

Thanks for the quick reply...Rick