Sitecore 9 forms - capture input from form then put that information to exm email template - sitecore-exm

How do you get the user input (e.g. First Name, Last Name etc...) from sitecore 9 forms then put that to exm email template before sending the email?
What i want to achieve is for example: I have a form that have first name, last name and position and comments field and i want that user input data (first and last name, position and comment) to be pass on the email template that on the EXM and send it as an email upon clicking the submit button in the form. Is that possible?

You need to update the contact details, you can do that with a custom save action.
It is documented on the Sitecore doc website see:
Walkthrough: Creating a custom submit action that updates contact details
This are the steps:
Create a submit action class
Create the SPEAK editor control
Add a folder that contains parameters for the editor
Create the client script for the editor
Create a submit action item
The following blog explains Sitecore Forms Send Email Campaign message alternative you can also create an custom sent e-mail or if you need other examples of custom Forms extensions see Sitecore-Forms-Extension-Pack

Related

How can I create a template with fields that is view only? [DocuSignApi]

I have a template that is configured with a recipient that has read only fields and only a signature control. The read only fields/tabs are populated in the view request my API sends to DocuSign to get the signature url. However I'd like to create a new duplicate template that does not have the signature control and is configured to only require the recipient to view the document. This way the only signature event that is set by DocuSign is "viewing_complete" and not "signing_complete" when they're done viewing the template/document.
Edit: The purpose of this is it gives the user a read only view of the template/document so they can catch any errors in the mapped fields/tabs to give them a chance to correct it before signing a final version.
Not sure if you want to create this template from the API or from the web app.
You can easily do this from the web app and if you want to do from the API, you can get a log of the API calls to see how it was done.
When you create a template from the web app, in the first screen, you can pick recipients and there's a drop down with different types of recipients:
Select the "Needs to View" recipient type for your needs.
It's not possible to configure a template to accept populated tabs for a recipient that is set as Needs to View or to preview an envelope recipient view and have the tabs populated, but not show the Signature control.

Pre-populate contact information

If a person has previously filled out a contact us form on our website, the next time they visit that form I would like their information pre-populated. Using Kentico EMS and the form builder, how can I make that happen?
you can access the contact informant via macros or custom macro methods and place it in the contact form default values (I would use an alternative form), but often you do not know if the user already exists unless they are logged in or enter the same email (which you would then need to add a client side trigger to Ajax an api once the email field is filled out, check for that contact in the api, return json of their info and populate the form).
to build the api you can either use the Kentico rest service or if you need more flexibility use the web part to api coupled with a repeater with custom query, adding the right where condition through macros.

How can an InfoPath form get the Claims of the user who is logged in to SharePoint?

We have a document library that contains a list of proposals (InfoPath Forms). Users log in through SharePoint using Claims (Forms Auth, via an Extranet) who are from various organizations. The forms open in InfoPath on the client. The InfoPath form contains a field for what organization the proposal belongs to (a select list) that the user then selects when filling the form.
We have written a custom claims provider that augments each user's login with an organization claim.
When the user opens a proposal from SharePoint in the InfoPath form filler, we'd like to:
Pre-populate the organization select list with the organization
matching the user's claim
Restrict the saving of the form (inserting and updating) if the
user's claim value for organization does not match the selected
organization on the form
I'm wondering how to get the claims information in InfoPath. Or, for ideas on how to do this server-side using a custom workflow/event receiver/web service (or something else).
Here is a basic tutorial for getting claims from SharePoint 2010. Place this in the code behind of your InfoPath form. http://msdn.microsoft.com/en-us/library/ee535731.aspx
Ideally you want to call the code from the FormEvents_Loading method of your InfoPath form and if the user's organization is invalid, create a bool, that if false, will prevent the form from submitting. This would be done in the FormEvents_Submit method.
I'm not sure if this works for your specific implementation however, you can set the data source for input controls (drop down lists, list boxes, etc) to be retreived from a web service.
You can then use hidden fields on the eForm which are populated with the metadata you need such as the user Id. These values are subsequently passed to the webservice and the return (List or whatever) are bound to the desired controls within the eForm.

Send an e-mail based on Workflow approval status using Sharepoint 2007

I am new to sharepoint. I am using sharepoint 2007. I have a following requirement.
1) Custom list has various fields ... Requestor, Application Name, Reason, etc..
2) When person fill out the form (custom list). It will send a notification to Approvers for review and based on Request action : Approved --> It will send an e-mail notification to specific group.
I have a setup a document approval workflow on custom list. Workflow works fine but I don't know how to send an e-mail notification based on workflow status : Approved. I have tried to create a another workflow using Sharepoint Designer 2007 but didn't work.
I would like to know whether it is possible without doing any programmatic way ? I would appreciate your reply.
Thanks in advance.
This is more like a SharePoint Designer Workflow, which responds to actions and rules.
You can get an introduction here
follow the steps ,these are the main steps you can have a try:
Create workflow attach to the list and start it manually & auto
start it when a new item is created & auto start it when an item is
modified.
Add Collect data from a User action. Click data and add a choice field (named it approval, give two choices: approve, reject)
in the custom task wizard. Output to Variable:collect
Add a new step, Conditions: if Variable:collect equals to Approve Actions: Send email to Created by
Collect (main manager) data from a user. Output to Variable:collect1(similar with step 2) Conditions: if
Variable:collect1 equals to Reject Actions: Send email to
Created By.
Add new step similar with step 3. Send approve email to Created By when Variable:collect1 equals to Approve or send reject
email when Varible:collect1 equals to Reject.
here is one of bolg which also you can refer
http://www.gandhipritesh.com/2009/07/create-custom-approval-workflow-using.html

SharePoint Registration Form - How to Hide Fields

I created a basic registration form using a SharePoint 2007 custom list where users complete fields on the form. I created an 'Approver' field that I'm trying to hide from customers so that only the form's approver will edit that field (approve the request - Customers tend to approve their own request). How can I hide this approval field so it can be edited by the approver only?
Attempted Solutions:
1. I set the content type for that approval column to 'hidden'. How would I access the URL to the hidden approval field so the approver can access the field and update it for that specific item? The hidden field is not visible if I click 'Edit Item'. Did I miss something with the hidden content type so that I would see the column on the edit page?
2. I customized newform.aspx in designer by removing the hidden approval field and it worked. But 'Attach File' doesn't work when the new form is customized. It spews out an errors.
Any suggestions?
Have a look at the SPListDisplaySettings component from codeplex. Adding this solution will allow you to specify how to show the fields in display, new and edit mode based on SharePoint users and groups.
May be create a custom field control (how?) that will check the current users role agains the site before choosing to display the field.
This is pretty hard core customisation compared to creating lists though.
Why not just use the Approval workflow with this list? Users would be able to create approval requests, which would automatically trigger the Approval workflow, which would create a task and send an e-mail for the approver to approve the request. Once it's approved - the status of the request would change to approved. The approver can also add a comment on the approval form, if needed.

Resources