I’m sorry if I’m missing something completely obvious, but I’m getting a serialized array outputted when trying to use this as a single field (that is, not in a matrix).
My field name is multimedia_screenshot. My code (simplified) is:
I’m sorry if I’m missing something completely obvious, but I’m getting a serialized array outputted when trying to use this as a single field (that is, not in a matrix).
My field name is multimedia_screenshot. My code (simplified) is:
Where is says “file_name” should be your sub custom field name. Referring to attachment I use…
Thanks Cem. I understand that your code is correct when using FF Matrix, but I am trying to use the File Field standalone—that is, not within a matrix.
After working with the nGen File field with the matrix and as a standalone field, I have discovered that the extension code is assigning classes that do not appear to exist in the accompanying css file. The missing css classes are:
I have already verified that these fields do not exist in the ngen_file_field.css style sheet and that the style sheet is included - the ngen-file-delete-button class used to display the delete.png image is working. I have downloaded the latest nGen File field extension a couple of times to ensure I had the latest version.
Has anyone else run into this issue? Is this by design?
I checked the jquery.ngen_file_field.js and that code does not look for the css classes I mentioned.
We can create the css styles to match the names assigned. What brought this to my attention is that the display of the nGen file field on our publish/edit screens is much different from that shown in the screen shots on the nGen site for this extension. I had assumed that what was shown in that screen shot is what I might expect to see without any customization of the styles on our end.
may I sound stupid, but I couldn’t install that or activade - I copied the files exactly where they should be, but how to activate / access this plug-in?
EDIT: - Ahhh - part of the Field frame work ....
OK, Brandon figured out the solution for my issue. I was using relative paths in the FieldFrame settings to point to the fieldtypes folder, which, while it works in the Control Panel, messes up the tagdata output. Adding this to the top of ext.fieldframe.php fixed it:
Great addon, this field seems to work perfectly for me except for one issue - if the file already exists, I get a PHP “can’t write headers” error on publish. It seems that everything works, and it creates a derivative file, and displays in my weblog, but I think this error could scare my client if they ever run into a similar situation.
Its a great extension and thanks for this!
But can somebody help with next error:
$ is not a function [Break on this error] $('.ngen-file-delete-button').click( function() { jquery.n..._field.js (line 1) nGenFile is not defined [Break on this error] nGenFile.lang.confirmDeleteFile = "Are you sure you want to delete this file?";
There’s no AJAX with that function, just JS (as far as I know). But that seems indicative of a JS conflict. Are you running other extensions that add javascript to the control panel? I was having a similar issue with Solspace’s Primary Category.
ok. I find my way - if somebody will have the same error, u need to open file jquery.ngen_file_field.js
and put (function($){ in begin and })(jQuery); in EOF. So u will have something like this: