Then you don't need some fancy javascript to load in values etc.
You may bash on JavaScript all you want; it is the preferred solution here from an End-User point of view because he/she triggers the cloning in the Browser.
You have to let go of the old-school SharePoint back-end approach and poplulating controls.
All you have to do is
- create a new item
- copy field values from the original item
- Open the EditForm of that new item
The user may want to clone an Item either in a Display Form or a View.
If you are happy with only activating from a View

You can paste this Formula in a Calculated Column and set the Datatype to Number
="<img style=cursor:pointer src=/_layouts/images/icongo01.GIF onclick=""{"
&"event.stopPropagation();"
&"function cloneItem(id){var c=new SP.ClientContext.get_current(),"
&"l=c.get_web().get_lists().getById(SP.ListOperation.Selection.getSelectedList()),"
&"i=l.getItemById(id),f=l.get_fields(),n,e,d,m,v,"
&"url=_spPageContextInfo.serverRequestPath;c.load(i);c.load(f);"
&"c.executeQueryAsync(function(){"
&"n=l.addItem(new SP.ListItemCreationInformation());e=f.getEnumerator();"
&"while(e.moveNext()){d=e.get_current();m=d.get_internalName();"
&"if(!(d.get_readOnlyField()||d.get_hidden()||['Attachments','ContentType'].indexOf(m)>-1)){"
&"v=i.get_item(m);if(v)n.set_item(m, v);}}n.update();c.load(n);"
&"c.executeQueryAsync(function(){"
&"document.location=url.substr(0,url.lastIndexOf('/'))+'/EditForm.aspx?ID='+n.get_id();})})}"
&"this.style.display='none';var TR=this;while(TR.tagName!='TR'){TR=TR.parentNode}"
&"TR.style.cursor='wait';cloneItem(TR.id.split(',')[1]);"
&"}"">"
Full explanation at http://www.viewmaster365.com/#/How
(including Pros & Cons)
It adds a Clone button to the View, onclick it
- Creates a new Item in the current List
- copies all Fields from the current Item to the New Item (exlcuding Attachments/ContentTypes)
- redirects the browser to the EditForm of the New Item
It only works in Views.. but does work in SP2010
In SP2013 you can offload the logic to a CSR file; and use it anywhere you want. But you need some more boilerplate code to trigger the uncompressed code:
function cloneItem(id) {
var c = new SP.ClientContext.get_current(),
l = c.get_web().get_lists().getById(SP.ListOperation.Selection.getSelectedList()),
i = l.getItemById(id),
f = l.get_fields(),
n, e, d, m, v,
url = _spPageContextInfo.serverRequestPath;
c.load(i);
c.load(f);
c.executeQueryAsync(
function () {
n = l.addItem(new SP.ListItemCreationInformation());
e = f.getEnumerator();
while (e.moveNext()) {
d = e.get_current();
m = d.get_internalName();
if (!(d.get_readOnlyField()
|| d.get_hidden()
|| ['Attachments', 'ContentType'].indexOf(m) > -1)
) {
v = i.get_item(m);
if (v) n.set_item(m, v);
}
}
n.update();
c.load(n);
c.executeQueryAsync(function () {
document.location = url.substr(0, url.lastIndexOf('/'))
+ '/EditForm.aspx?ID=' + n.get_id();
})
})
}
ICC