Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Form Questions /

UploadField Thumbnails and other issues SS3


Reply


2 Posts   441 Views

Avatar
tazzydemon

Community Member, 122 Posts

12 October 2012 at 2:12pm

I have created an Orbit slider class to go with my foundation template. This class has some couple of small issues as detailed below:

1. If I use the UploadField to choose an image "from files" the resulting popup is correct and in the correct directory but does not show the thumbnails that are available in the Files repository. What is the config to enable this - or is there on at all? Very hard to choose images if you cant see them.

2. How do I disable the upload buttons when there is already one image. This is supposed to be automatic in a has_one and I have set allowedMaxFileNumber' => 1 to no avail.

3. When I create a new Orbit image and choose an image "from files" it fails as there is no actual object to attach it to. I see there is a setRecord() method available but cant see how to use it. If I save the new, empty Orbit image before choosing a "from file" it works fine. Curiously, if I upload a fresh image to an unsaved new Orbit image this seem to happen automatically and it works fine.

Any ideas appreciated.

Avatar
tazzydemon

Community Member, 122 Posts

12 October 2012 at 2:15pm

Edited: 12/10/2012 2:16pm

An addendum to my post..
if I add

$imageField->setRecord($this);

Then I get "Files can be attached once you have saved the record for the first time." in the image upload field, which at least makes some sense. So I guess I have to save the record the instant its created.

Ideas again..how?

Oh and I know my hat looks stupid.. it was my daughter's wedding at Tekapo!