@douglasdallas
I wrote a code example (in C#, but I think you can understand it) to display formatting information for a TextBoxFields in document.
var doc = new Document(dataDir + "form1.pdf");
foreach(Field field in doc.Form.Fields)
{
if (field is TextBoxField)
{
var tbf = field as TextBoxField;
if (tbf.Actions != null && tbf.Actions.OnFormat != null)
Console.WriteLine(tbf.Actions.OnFormat.GetECMAScriptString());
}
}
@douglasdallas
For the option indicated in the attached image (dd-mmmm-yy), the assigned data must contain the day, month in full notation and year in two digits.
For example “10-jaNuarY-24”. Certain adjustments are made and, say, “1-2-24” should also pass, but if the submitted data differs greatly from the specified format, the assignment will not be performed.
This is what we have tried and it would appear not to be working.
I have a PDF form, with a date format of ‘dd-mmm-yy’ which shows in Adobe as ‘08-Feb-24’. In my test program if I set the TextboxField value (string) to ‘08-Feb-24’ then when it ends up in the PDF it is blank for some reason. If I pick it from the date picker and save the value inside Adobe it works as expected.
Strangely if I set the date format in Adobe to be ‘dd/mm/yy’ and set the value as ‘02/08/2024’ then it would appear to work. If looks like combinations of the format and the value seem to have an issue.
Is there any specical processing that goes on behind the scenes? Could a change be made to accept a date?
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.