1

I am trying to create the process described below:

enter image description here

  1. The user clicks a specific link placed in a page or subsite (I'm using SPS2013)

  2. Clicking the link opens up a form (doesn't have to be an InfoPath form, if there are easier or better options it will be great)

  3. The user fills the form and at finishing clicks a specific button (save or send or something like that)

  4. Then, the form closes, the data input in the form goes to a list within the same SPS2013 site, and at the same time, an e-mail is sent to the predetermined people. And that's it.

I hope my question is clear. I am fairly new to SharePoint and any guidance will be truly appreciated.

Thanks

Jim

0

Its simple. First thing is InfoPath is deprecated after 2013 version and no more updates on the existing one. So better to adapt ourselves for what is coming in the future.

I can propose this.

  1. Add a script editor web-part to your page. On button click of this link pop-up a bootstrap modal Or jQuery UI modal. Provide all the text box and options you want to fill inside the modal

  2. Use REST API Or JSOM to collect all the data inside the modal and update in the list.

  3. Create a workflow for sending email. Condition would be start the workflow after item is created and send the email with the items you want to describe inside it.

Kindly let me know if you need further help.

Thanks

function saveListItems() {
var emp_name = document.getElementById('Employee_Name').value;
var empProjectDetails = document.getElementById('projectDetails').value;
var empDesignation = document.getElementById('selDesignation').value;
var empDOJ = document.getElementById('dateOfJoining').value;
var empCompany = document.getElementById('emp_company').value;
var empID = document.getElementById('emp_id').value;
var newItemUrl = "/_api/Web/Lists/GetByTitle('Sukumar_List')/Items";
var metadata =
    {
        __metadata:
          {
              'type': 'SP.Data.Sukumar_x005f_ListListItem'
          },
        Emp_Name: emp_name,
        Project_Details: empProjectDetails,
        Designation: empDesignation,
        Date_x0020_of_x0020_Joining: empDOJ,
        Company: empCompany,
        Emp_ID: empID,
    }
addNewItem(newItemUrl, metadata)
}
function addNewItem(newItemUrl, metadata) {
$.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + newItemUrl,
    type: "POST",
    headers: {
        "accept": "application/json;odata=verbose",
        "X-RequestDigest": $("#__REQUESTDIGEST").val(),
        "content-Type": "application/json;odata=verbose"
    },
    data: JSON.stringify(metadata),
    success: function (data) {
        window.location.reload();
    },
    error: function (error) {window.alert(error);}});
}

My Column Names:

Emp_Name, Project_Details, Designation, Date Of Joining, Company and Emp_ID

List Name : Sukumar_List

Call the saveListItems() function on the button click of Submit inside the Modal pop-up.

Let me know if this help. Here we doing via REST API.

  • Thank you for the answer! I confess I have just started coding websites for own (I've been in the UX field for quite a while now but still a huge beginner with coding). I believe I got your steps 1 (creating a normal popup with Bootstrap or jQuery) and 3 (creating a workflow to send the email when a new item is added). Could you teach me a little more about how step 2 works in your scenario? (so I can do my homework to implement your suggestion). Thank you in advance! – Jim Moriya Apr 5 '18 at 1:46
  • Hi there, Yes Sure.. I will update you with the code for inserting data inside a list – Sukumar MS Apr 5 '18 at 6:07
  • Thank you very much Sukumar MS! I'll be trying the method you proposed and soon I'll let you know how things are going. Maybe I'll ask you for help again if something doesn't work. – Jim Moriya Apr 5 '18 at 13:10
  • No probs.. kindly mark it as answer if it helps you – Sukumar MS Apr 5 '18 at 15:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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