Add an attachments field and submit button

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
MES5464
Posts: 94
Joined: Mon Aug 26, 2013

21 Oct 2013

I found the following code that if pasted into an HTML control it will provide an file selection field for the user to select a file to attach to a list item, and an OK button that will then attach the file to the list item. It seems to work great.


<div height="15" id="attachmentsOnClient" style="float:left;">

<span dir="ltr">

<input type="file" name="fileupload0" id="onetidIOFile" size="56" title="Name" />

</span>

</div>

<div>

<input id="attachOKbutton" type="BUTTON" onclick='OkAttach()' value="Upload" style="width: 12.8em; height: 3em"/>

<span id="idSpace"/>

</div>

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

22 Oct 2013

Thank you very much for the usefull information!

hp
Posts: 26
Joined: Thu Jan 15, 2015

16 Jan 2015

How do i get attachment attached to list item? i have added html to my form, it display browse and upload buttons. it also fatched the file from system. My only question is what do i write on upload button to attach file to item. thanks in advance. and by the way this is awesome!

hp
Posts: 26
Joined: Thu Jan 15, 2015

16 Jan 2015

This works now. :) and i will say again its great

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests