On file / download field - show orig. name not actual

More
9 years 4 months ago #51652 by jeffhoneyager
Added a field type file.

When adding new item, and selecting a file, the Original File Name is inserted not the actual file name.

How do I change this to show the actual file name?

[attachment=2:1zaq3d4d]<!-- ia2 -->selected-file.png<!-- ia2 -->[/attachment:1zaq3d4d]

[attachment=1:1zaq3d4d]<!-- ia1 -->original-not-actual-selected-file.png<!-- ia1 -->[/attachment:1zaq3d4d]

Purpose: I want to show a MSWord document preview in a tab using a document viewer plugin ...

{aridoc engine="google" width="550" height="450"}documents/my_doc.doc{/aridoc}

It works great if I use a text field, but for data entry (mass quantities) it is going to be cumbersome.

[attachment=0:1zaq3d4d]<!-- ia0 -->document-viewer.png<!-- ia0 -->[/attachment:1zaq3d4d]
Attachments:

Please Log in or Create an account to join the conversation.

More
9 years 4 months ago #51654 by ggppdk
Hello

that is only for ITEM-FORM display !

- what is actually inserted in the form and allowed to be saved is the FILE ID (s)

inside you FLEXIcontent template

ITEM view: items(_htm5).php
CATEGORY-like views: category_items(_html5).php

you can use:
Code:
$html = FlexicontentFields::getFieldDisplay ( $item, 'fieldname', null, 'display', 'item' ); // AND USE: echo $html; // OR USE: echo $item->fields['fieldname']->display; // AFTER CALLING getFieldDisplay(), you can also use these arrays print_r($item->fields['fieldname']->filedata); // e.g. size, absolute paths, etc print_r($item->fields['fieldname']->url]); // file urls print_r($item->fields['fieldname']->abspath]); // file absolute pats

Read more here:
How to manually render/display fields inside templates ... and Upgrading custom Templates to work in v1.5.6+


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
9 years 4 months ago #51661 by jeffhoneyager

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.263 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline