I tried following code for sending a template request along with the custom fields but no luck and getting following error
ERROR:
string(11) "soap:Client" string(209) "Validation error: The element 'CustomField' in namespace 'http://www.docusign.net/API/3.0' has incomplete content.
List of possible elements expected: 'Required' in namespace 'http://www.docusign.net/API/3.0'."
I tried following code for sending a template request along with the custom fields but no luck and getting following error
ERROR:
string(11) "soap:Client" string(209) "Validation error: The element 'CustomField' in namespace 'http://www.docusign.net/API/3.0' has incomplete content. List of possible elements expected: 'Required' in namespace 'http://www.docusign.net/API/3.0'."
CODE 1 that I tried:
$envinfo = new EnvelopeInformation(); $envinfo->Subject = $frm["subject"]; $envinfo->EmailBlurb = $frm["emailblurb"]; $envinfo->AccountId = $this->getAccountID();
$customField = new CustomField(); $customField->Name = "TestName"; $customField->Value = "TestValue"; $customField->Show = "true"; $customField->Requried = "false"; $customField->CustomFieldType = CustomFieldType::Text;
$customFieldsArr[] = $customField; $envinfo->CustomFields = $customFieldsArr;
CODE 2 that I tried:
$envinfo = new EnvelopeInformation(); $envinfo->Subject = $frm["subject"]; $envinfo->EmailBlurb = $frm["emailblurb"]; $envinfo->AccountId = $this->getAccountID();
$customField[] = new CustomField();
$cf1 = new CustomField();
$cf1->Name = "TestName"; $cf1->Value = "TestValue"; $cf1->Show = "true"; $cf1->Requried = "false"; $cf1->CustomFieldType = CustomFieldType::Text;
array_push($customField, $cf1);
// eliminate 0th element array_shift($customField);
$envinfo->CustomFields = $customField;
I also tried assigning customfield array in the following way but did work: $envinfo->CustomFields->CustomField[] = $customField;
I've been mashing my head in searching the solution all the day without luck!