No Fields or Signatures mapped to form
Wednesday, September 14, 2016 at 10:26amHi all,
I am just getting through a few cycles of testing in the sand box on my way to uploading and populating large form with multiple signers from an external web app. It seems the documentation is not all the clear how to map fields to existing to PDF form fields. Also is there a way to test my code (100 plus fields and values) with out having to actually submit a package and wait for the emails to be sent?
It sends the document with out any errors but there are no fields filled in and no signature fields added. I have also attached the form I am trying to map to.
Emails get sent out but when the first signer oepn the form it just says
"This is a disclosure Document. You must read it and click the Accept button at the end of the Document before you can continue to the next Document."
Any here is my test code - Note: when I ran this with just a single signature it did work.
EslClient eslClient = new EslClient(apiKey, apiUrl);
string FormPath = Server.MapPath("~/Forms/Adv_Directives_Combined_2008_02.pdf");
FileStream fs = System.IO.File.OpenRead(FormPath);
DocumentPackage thisPackage = PackageBuilder
.NewPackageNamed("Advanced Directives Combined Form")
.WithSettings(DocumentPackageSettingsBuilder.NewDocumentPackageSettings())
.WithSigner(SignerBuilder.NewSignerWithEmail(model.SignerEmail)
.WithFirstName(model.SignerFirstName)
.WithLastName(model.SignerLastName)
.SigningOrder(1))
.WithSigner(SignerBuilder.NewSignerWithEmail("[email protected]")
.WithFirstName("Todd")
.WithLastName("Crisafulli")
.SigningOrder(2))
.WithDocument(DocumentBuilder.NewDocumentNamed("MentalHealthCareDeclaration_" + model.SignerFirstName + "_" + model.SignerLastName)
.EnableExtraction()
.FromStream(fs, DocumentType.PDF)
.WithSignature(SignatureBuilder.SignatureFor(model.SignerEmail)
.WithName("V_MySignature")
.WithPositionExtracted())
.WithSignature(SignatureBuilder.SignatureFor("[email protected]")
.WithName("IIIA_txtAgentSignature")
.WithPositionExtracted())
.WithInjectedField(FieldBuilder.TextField()
.WithName("IIIA_txtAgentAcceptPrintName")
.WithValue("Todd Crisafulli")
.WithPositionExtracted())
.WithInjectedField(FieldBuilder.CheckBox()
.WithName("IIA_cbxPsychiatricFacilityPrefered")
.WithValue("checked")
.WithPositionExtracted())
.WithInjectedField(FieldBuilder.RadioButton("IIA_rdoRecommendedMedication") // this is the radio button group name on the PDF
.WithName("IIA_rdoRecommendedMedicationsYes")
.WithValue(false)
.WithPositionExtracted())
.WithInjectedField(FieldBuilder.RadioButton("IIA_rdoRecommendedMedication") // this is the radio button group name on the PDF
.WithName("IIA_rdoRecommendedMedicationsNo")
.WithValue(true)
.WithPositionExtracted())
)
.Build();
PackageId packageId = eslClient.CreatePackage(thisPackage);
eslClient.SendPackage(packageId);
Reply to: No Fields or Signatures mapped to form
Friday, September 16, 2016 at 07:43amReply to: No Fields or Signatures mapped to form
Wednesday, September 14, 2016 at 10:27amReply to: No Fields or Signatures mapped to form
Wednesday, September 14, 2016 at 01:35pmReply to: No Fields or Signatures mapped to form
Wednesday, September 14, 2016 at 02:17pmReply to: No Fields or Signatures mapped to form
Wednesday, September 14, 2016 at 03:35pmReply to: No Fields or Signatures mapped to form
Wednesday, September 14, 2016 at 03:46pmReply to: No Fields or Signatures mapped to form
Friday, September 16, 2016 at 04:12amReply to: No Fields or Signatures mapped to form
Friday, September 16, 2016 at 06:03amDocumentPackage thisPackage = PackageBuilder.NewPackageNamed("Advanced Directives Combined Form") .WithSettings(DocumentPackageSettingsBuilder.NewDocumentPackageSettings()) .WithSigner(SignerBuilder.NewSignerWithEmail("[email protected]") .WithFirstName("John") .WithLastName("Smith") .SigningOrder(1)) .WithSigner(SignerBuilder.NewSignerWithEmail("[email protected]") .WithFirstName("Todd") .WithLastName("Crisafulli") .SigningOrder(2)) .WithDocument(DocumentBuilder.NewDocumentNamed("MentalHealthCareDeclaration_" + "John" + "_" + "Smith") .EnableExtraction() .FromStream(fs, DocumentType.PDF) .WithSignature(SignatureBuilder.SignatureFor("[email protected]") .WithName("V_txtMySignature") .WithPositionExtracted()) .WithSignature(SignatureBuilder.SignatureFor("[email protected]") .WithName("IIIA_txtAgentSignature") .WithPositionExtracted()) .WithInjectedField(FieldBuilder.TextField() .WithName("IIIA_txtAgentAcceptPrintName") .WithValue("Todd Crisafulli") .WithPositionExtracted()) .WithInjectedField(FieldBuilder.CheckBox() .WithName("IIA_cbxPsychiatricFacilityPrefered") .WithValue(true) .WithPositionExtracted()) .WithInjectedField(FieldBuilder.RadioButton("IIA_rdoRecommendedMedication") // this is the radio button group name on the PDF .WithName("IIA_rdoRecommendedMedicationsYes") .WithValue(false) .WithPositionExtracted()) .WithInjectedField(FieldBuilder.RadioButton("IIA_rdoRecommendedMedication") // this is the radio button group name on the PDF .WithName("IIA_rdoRecommendedMedicationsNo") .WithValue(true) .WithPositionExtracted()) ) .Build(); PackageId packageId = eslClient.CreatePackage(thisPackage);Also, note that when creating fields in your PDF document using Adobe Acrobat for example, they all should be textfields. eSignLive will convert them to whatever field you want when you specify it the code. In other words, the field "IIIA_txtAgentSignature" should be a textfield in your PDF document and once you specify "withSignature()" esignlive will convert it to a signature field. Hope this helps :)Reply to: No Fields or Signatures mapped to form
Friday, September 16, 2016 at 06:03amReply to: No Fields or Signatures mapped to form
Friday, September 16, 2016 at 07:38amReply to: No Fields or Signatures mapped to form
Friday, September 16, 2016 at 11:12amReply to: No Fields or Signatures mapped to form
Monday, September 19, 2016 at 03:44am.WithInjectedField(FieldBuilder.CheckBox() .WithName("IIA_cbxPsychiatricFacilityPrefered") .WithValue("checked") .WithPositionExtracted())Where as it should be:.WithInjectedField(FieldBuilder.CheckBox() .WithName("IIA_cbxPsychiatricFacilityPrefered") .WithValue(true) .WithPositionExtracted())Also, you do not need to group the radio buttons in your PDF. Once you declare:.WithInjectedField(FieldBuilder.RadioButton("IIA_rdoRecommendedMedication")eSignLive will automatically group them up for you.Reply to: No Fields or Signatures mapped to form
Tuesday, September 20, 2016 at 06:57am.WithInjectedField(FieldBuilder.RadioButton() -- Expects "string group" .WithName("IIA_rdoRecommendedMedicationsNo") .WithValue(true) .WithPositionExtracted())If one Injectedfield is not formatted correctly do they all fail? I am still not getting any errors in VS when debug. I put break point just after the .Build() call and get no errors. For example this text field is the first one in the list..WithInjectedField(FieldBuilder.TextField() .WithName("IIIA_txtAgentAcceptPrintName") .WithValue("John Doe") .WithPositionExtracted())It never shows up on the form?Reply to: No Fields or Signatures mapped to form
Tuesday, September 20, 2016 at 07:27amusing System; using System.IO; using Silanis.ESL.SDK; using Silanis.ESL.SDK.Builder; using System.Collections.Generic; namespace esl { public class FieldInjection { //replace api_key placeholder with your own value public static string API_KEY = Properties.Settings.Default.key; public static string API_URL = "https://sandbox.esignlive.com/api"; public static void main() { EslClient eslClient = new EslClient(API_KEY, API_URL); FileStream fs = File.OpenRead("C:/Users/hhaidary/Desktop/Adv_Directives_Combined_2008_02.pdf"); DocumentPackage packageToSend = PackageBuilder.NewPackageNamed("Field Injection Example") .WithSigner(SignerBuilder.NewSignerWithEmail("[email protected]") .WithFirstName("John") .WithLastName("Smith") .WithCustomId("client") ) .WithDocument(DocumentBuilder.NewDocumentNamed("Sample Contract") //.EnableExtraction() .FromStream(fs, DocumentType.PDF) .WithInjectedField(FieldBuilder.TextField() .WithId("Text1") .WithName("Text1") .WithValue("200 E MAIN ST, PHOENIX AZ, 85123 USA")) .WithInjectedField(FieldBuilder.TextField() .WithName("IIIA_txtAgentAcceptPrintName") .WithValue("John Doe") .WithPositionExtracted())) .Build(); PackageId packageId = eslClient.CreatePackage(packageToSend); } } }What instance of ESL are you testing (i.e. are you on sandbox.e-signlive.com or sandbox.esignlive.com)? And also what SDK version are you using? And to answer your question: No that shouldn't be the case. As you can see in the code above, the field "Text1" isn't present in your PDF but John Doe was still injected onto the document. Please make sure you have all the correct names in your code and PDF.Reply to: No Fields or Signatures mapped to form
Tuesday, September 20, 2016 at 07:28amReply to: No Fields or Signatures mapped to form
Tuesday, September 20, 2016 at 07:38amReply to: No Fields or Signatures mapped to form
Tuesday, September 20, 2016 at 07:41amReply to: No Fields or Signatures mapped to form
Tuesday, September 20, 2016 at 07:47amReply to: No Fields or Signatures mapped to form
Tuesday, September 20, 2016 at 08:11amReply to: No Fields or Signatures mapped to form
Tuesday, September 20, 2016 at 08:33amReply to: No Fields or Signatures mapped to form
Tuesday, September 20, 2016 at 08:41amReply to: No Fields or Signatures mapped to form
Tuesday, September 20, 2016 at 09:25amReply to: No Fields or Signatures mapped to form
Tuesday, September 20, 2016 at 09:29amReply to: No Fields or Signatures mapped to form
Tuesday, September 20, 2016 at 09:57amstring apiUrl = "https://sandbox.e-signlive.com/api"; // USE https://apps.esignlive.com/api FOR PRODUCTION string apiKey = "api_key"; try { EslClient eslClient = new EslClient(apiKey, apiUrl); string FormPath = Server.MapPath("~/Forms/Adv_Directives_Combined_2008_02.pdf"); FileStream fs = System.IO.File.OpenRead(FormPath); DocumentPackage thisPackage = PackageBuilder .NewPackageNamed("Advanced Directives Combined Form") .WithSettings(DocumentPackageSettingsBuilder.NewDocumentPackageSettings()) .WithSigner(SignerBuilder.NewSignerWithEmail(model.SignerEmail) .WithFirstName(model.SignerFirstName) .WithLastName(model.SignerLastName) .SigningOrder(1)) .WithSigner(SignerBuilder.NewSignerWithEmail("[email protected]") .WithFirstName("Todd") .WithLastName("Crisafulli") .SigningOrder(2)) .WithDocument(DocumentBuilder.NewDocumentNamed("MentalHealthCareDeclaration_" + model.SignerFirstName + "_" + model.SignerLastName) .EnableExtraction() .FromStream(fs, DocumentType.PDF) .WithSignature(SignatureBuilder.SignatureFor(model.SignerEmail) .WithName("V_txtMySignature") .WithPositionExtracted()) .WithSignature(SignatureBuilder.SignatureFor("[email protected]") .WithName("IIIA_txtAgentSignature") .WithPositionExtracted()) .WithInjectedField(FieldBuilder.TextField() .WithName("I_txtMyPrintName") .WithValue("John Doe") .WithPositionExtracted()) //.WithInjectedField(FieldBuilder.CheckBox() //.WithName("IIA_cbxPsychiatricFacilityPrefered") //.WithValue(true) //.WithPositionExtracted()) //.WithInjectedField(FieldBuilder.RadioButton("IIA_rdoRecommendedMedication") // this is the radio button group name on the PDF //.WithName("IIA_rdoRecommendedMedicationsYes") //.WithValue(false) //.WithPositionExtracted()) //.WithInjectedField(FieldBuilder.RadioButton("IIA_rdoRecommendedMedication") // this is the radio button group name on the PDF //.WithName("IIA_rdoRecommendedMedicationsNo") //.WithValue(true) //.WithPositionExtracted()) ) .Build(); PackageId packageId = eslClient.CreatePackage(thisPackage); //eslClient.SendPackage(packageId);Reply to: No Fields or Signatures mapped to form
Tuesday, September 20, 2016 at 10:11amReply to: No Fields or Signatures mapped to form
Tuesday, September 20, 2016 at 10:40amReply to: No Fields or Signatures mapped to form
Tuesday, September 20, 2016 at 11:06amReply to: No Fields or Signatures mapped to form
Tuesday, September 20, 2016 at 11:08amReply to: No Fields or Signatures mapped to form
Wednesday, September 21, 2016 at 05:07amDocumentPackage packageToSend = PackageBuilder.NewPackageNamed("Field Injection Example") .WithSigner(SignerBuilder.NewSignerWithEmail("[email protected]") .WithFirstName("John") .WithLastName("Smith") .WithCustomId("client") ) .WithDocument(DocumentBuilder.NewDocumentNamed("Sample Contract") .EnableExtraction() .FromStream(fs, DocumentType.PDF) .WithInjectedField(FieldBuilder.TextField() .WithName("I_txtMyPrintName") .WithValue("John Doe")) .WithSignature(SignatureBuilder.CaptureFor("[email protected]") .WithName("IA_txtEvaluatedByDoctorName") .WithPositionExtracted()) ) .Build();You should have the following in your code:- EnableExtraction()
- WithPositionExtracted() for each signature
- remove WithPositionExtracted() for each injected field
Let me know if this works for you =]Reply to: No Fields or Signatures mapped to form
Wednesday, September 21, 2016 at 07:19amReply to: No Fields or Signatures mapped to form
Wednesday, September 21, 2016 at 07:53am