I'm trying to use multiple Safecracker File fields in a Safecracker form.

I tried to use one matrix field with one column - the SC File field. On submission, no rows or files were added.

I thought it would be easier to take Matrix out of the equation so I changed it to 3 separate SC File fields. Now only the first field gets uploaded. I don't see any errors (tried logged in as Super Admin and Non-Super Admin)

My template code is very simple.

{exp:safecracker ...}
    {if safecracker_file}

The fields are output correctly, each have unique names.
The following is what is output for each field:

<div class="safecracker_file_set">
  <div class="safecracker_file_hidden">
    <input type="hidden" name="CUSTOM_FIELD_NAME_3_hidden" value="">
  <div class="safecracker_file_placeholder_input">
    <input type="hidden" name="CUSTOM_FIELD_NAME" value="NULL">
  <div class="safecracker_file_input">
    <input type="file" name="CUSTOM_FIELD_NAME" value="">

Running 2.5.3, but I don't see anything in the changelog that directly mentions something like this. I'd realllllly like to avoid upgrading.

  • Do the three Safecracker File fields all have unique names when you inspect the source code of the generated page? Feb 11, 2013 at 15:17
  • Yes, they do. I'll update my question to show the code that's generated. Feb 11, 2013 at 15:19

2 Answers 2


My custom fields were named as _x with underscores:

{attachment}, {attachment_2}, {attachment_3}

Removing the underscores fixed the problem:

{attachment}, {attachment2}, {attachment3}.

This was verified by EllisLab as a bug and a bug report has been filed.


FWIW, I have a similar setup that is working correctly, but it's on a 2.5.2 install. Code is identical to yours - is it possible there's a js conflict?

  • Hmm I don't see any JS errors when loading the page or submitting it. Feb 22, 2013 at 18:46

Your Answer

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

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