SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A lot of my Sharepoint Sites require input from the Users to add to Lists, Document Libraries and so on. However, sometimes Users have trouble finding the "Add New Item" button when attempting to add to a list.

I've gotten around the issue by simply adding a more visible button to the page (via HTML) which links directly to the NewForm.aspx page for my List. This gets the job done, but I'd rather have the NewForm appear as a Pop-Up window like it would when clicking the actual "Add New Item" button.

Is there a way to implement the Add new item Pop-Up form into my HTML code? Perhaps with Javascript perhaps?

share|improve this question
up vote 1 down vote accepted

Yes you can call the SP JavaScript library to open up the modal pop up.

$('.button').click(function (e) {
        var options = SP.UI.$create_DialogOptions();
        options.url = $(this).attr("href"); //url of the newitem.aspx
        options.dialogReturnValueCallback = Function.createDelegate(null, processClose);

    function processClose(result, returnValue) {
        if (result == SP.UI.DialogResult.OK) {
            if (returnValue == null) {
                SP.UI.Notify.addNotification('Operation successful');

This code above will open the modal dialog and handle closing of it. Also i am using jquery, so make sure you have that referenced in the page.

share|improve this answer
A good article on this subject: – Emon Feb 27 '13 at 0:27
This worked perfect, thanks! – Lando Feb 27 '13 at 17:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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