0

I want to change the location of an attached file in a list. My list has multiple rows of information to fill out, but when you attach something to it, it places the attachment at the bottom. Is there any way to make the attachment go between a specific two rows when adding or editing a list item?

2
  • Do you mean between 2 fields on the new item form?
    – Lance
    Commented Sep 1, 2015 at 0:24
  • Yes. That's exactly what I mean.
    – Andrew
    Commented Sep 1, 2015 at 14:14

1 Answer 1

1

You could load some javascript on the form that gets the attachment row (id="idAttachmentsRow") and moves it to a different row.

Here is a basic example:

var attRow = document.getElementById("idAttachmentsRow");
attRow.parentElement.insertBefore(attRow,attRow.parentElement.children[1]);

For a detailed walk-through, you could check out Mark Rackley's post. He loads a custom HTML template and uses JS to move all the form elements into his custom layout. He also explains how to load the JS on the forms by editing the list forms.

Note: In my environment, the attachment row doesn't show on the form until I actually add an attachment with the ribbon. It is still there in the DOM so you can manipulate it with your script. By default, it is hidden when no there are no attachments.

1
  • Perfect!! Thank You much!
    – Gennady G
    Commented Nov 13, 2019 at 16:48

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.