Search code examples
pdfprogress-4gl4gl

How do I fill out fillable PDF Form fields using 4gl?


I have a PDF form that I'm filling out with data using progress-4gl. To date, I've been only filling in text fields using the following syntax:

 put stream stream1 unform
"^global CHX_SINGLE_CE_PLAN3"               skip(0)
"X"                                         skip

CHX_SINGLE_CE_PLAN3 is the field name...

This code works when dealing with text fields but I'm trying to check a box instead of fill in a text field. I cannot find any documentation on this. Is checking a box on a fillable pdf form even possible with 4gl?


Solution

  • I discovered the answer, which I thought I had already tried before asking this question. The answer is you need to pass the value "Yes" (with capital "Y") in order to check the checkbox. The correct code in this instance is:

    put stream stream1 unform
    "^global CHX_SINGLE_CE_PLAN3"               skip(0)
    "Yes"                                       skip
    

    I believe this is the case no matter which language you're using