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

  • Any reason why you don't want to use {field:banner_photo} if it works? – lealea Nov 12 '13 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 '13 at 21:59
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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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