View more context

 

Rathai

Hi. Does anyone have solution for adding multiple file upload field in custom form.

muskie9

may be based on how SS views it as a "File" vs "Image"

muskie9

if you find a way to do a preview it'd definitely be worth posting... pretty sure it's been brought up a few times

👍 (1)
John Lombardo

I’ve got a timestamp from an API and I want to display it formatted in two different ways in the template. Should I format it in the controller or create a DBDate instance and format it in the template?

John Lombardo

I’ve tried using DBDate::create($timestamp) in the controller but I don’t think that is working.

John Lombardo

It prints as blank and I can’t call any methods on it

nightjarnz

@John Lombardo I think DB fields have a different type of constructor. Try DBFields::create('Date', $timestamp) (top of my head, please check this with API) or DBDate::create()->setValue($timestamp) - beware that the format that DBDate desires may not be that of a timestamp (i.e. it might want an ISO formatted string)

John Lombardo

I’ll give it a try. Hopefully it gives me some sort of error I can debug with instead of just nothing 😉