Module: FEU Uploads custom fields

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
blackrain
Forum Members
Forum Members
Posts: 98
Joined: Wed Feb 20, 2008 4:33 pm

Module: FEU Uploads custom fields

Post by blackrain »

I am trying to add custom fields to the uploads module.

I created a custom field (dropdown) and added values. however I am not able to show the value of the dropdown on the front end.

I have tried the usual

Code: Select all

{$entry->fielddefs->section.value}
{$entry->custom_field->section}
etc..

but no results are shown, any idea what the correct syntax is for this please.

many thanks

Mark
blackrain
Forum Members
Forum Members
Posts: 98
Joined: Wed Feb 20, 2008 4:33 pm

Re: Module: FEU Uploads custom fields

Post by blackrain »

I have used this to get me over the issue but I really need to be able to access the individual custom field.

Code: Select all

{if isset($entry->fields)}
    {foreach name=fields from=$entry->fields key='fldname' item='field'}
         {$field.value}
    {/foreach}
{/if}
if I add more fields the returned data would be concatenated.

Thanks
User avatar
PinkElephant
Forum Members
Forum Members
Posts: 169
Joined: Fri Feb 06, 2009 2:08 pm

Re: Module: FEU Uploads custom fields

Post by PinkElephant »

blackrain wrote:access the individual custom field
Installing the module (so much good work here) and using a test-category and couple of field definitions, imaginatively named test-field-definition-01 (text) and test-field-definition-02 (dropdown) and ...

Code: Select all

	{if isset($entry->fields)}
		<h2>Debug</h2>
		<pre>
			{* print_r($entry->fields) *}

			01 name: {$entry->fields['test-field-definition-01']['name']}
			01 value: {$entry->fields['test-field-definition-01']['value']}

			02 name: {$entry->fields['test-field-definition-02']['name']}
			02 value: {$entry->fields['test-field-definition-02']['value']}
		</pre>
	{/if}
... bingo.
blackrain
Forum Members
Forum Members
Posts: 98
Joined: Wed Feb 20, 2008 4:33 pm

Re: Module: FEU Uploads custom fields

Post by blackrain »

Thank you @PinkElephant, that works perfectly.
Locked

Return to “Modules/Add-Ons”