Want to open a form from a link in a freely-selected place (not from the link within a list or library)

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/239205

  •  13-01-2021
  •  | 
  •  

Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top