2

Is there anyway to add a file custom fieldtype in a channel:form tag like so:

input type="file" name="photo_banner" value="{banner_photo}"

Instead of: {field:banner_photo}

I can get the latter to work, but not the former.

Thanks,

Fabian

2
  • Any reason why you don't want to use {field:banner_photo} if it works?
    – lealea
    Nov 12, 2013 at 21:39
  • I want to leverage a jquery upload plugin that provides some neat interface features, but the plugin requires some extra data attributes in the file field.
    – Fabian
    Nov 12, 2013 at 21:59

1 Answer 1

2

I managed to achieve this by using the {field:custom_field} method, then inspecting the DOM and copying the div.file_field element, and adding it directly to my template. I also had to copy over the safecracker script tag that the {field:custom_field} tag generated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.