cancel
Showing results for 
Search instead for 
Did you mean: 

Change interactive form FILLABLE to readonly?

Former Member
0 Kudos

SAP Community Network:

SAP Interactive Form by ADOBE question:

How does one turn a FILLABLE interactive PDF to "read-only" after the form has been created then modified with data?

Scenario:

  • I have created an interactive ADOBE PDF form in SAP with data embedded in form for dropdown lists. 
  • The PDF form is sent via e-mail to an external customer. 
  • External customer selects the e-mail attached PDF and modifies interactive PDF form filling in open data fields and choosing data from drop down lists.
  • The customer then sends back the interactive PDF form via e-mail using a JAVASCRIPT submit button using an embedded specific e-mail address that is forwarded to an SAP port where a SCOT inbound process looks for the e-mail and extracts the attached PDF data.

  ***NOTE*** at this point, the form should converted to read-only

  • The Inbound Process determines what data is extracted from the PDF form and an SAP Business WORKFLOW is triggered with the form data added to Workflow's data container
  • The first activity of the WORKFLOW is to attach the form to the WORKFLOW.
  • During WORKFLOW decision tasks the attached PDF form is available for review.  But it is in editable mode and the requirement is have a READ-ONLY form for viewing only.

After the external customer enters data to the form, I would like the form to be read-only.  I have not found a method to change the DOCPARAMS-FILLABLE back to ' '.   Or, have found in WORKFLOW to change the viewing of attachments as READ-ONLY.   Please advise.

(I have entered discussion in SAP BUSINESS WORKFLOW also)

Thank you in Advance.

Jim

Accepted Solutions (1)

Accepted Solutions (1)

sandeep_katoch
Contributor

Hi Jim,

If I am understanding your requirement right.

On the Submit button from which the customer sends the pdf you can give a java script and make all fields read only.

The syntax of the script will be in formCalc on click event.

form1.sbtable.access = "readOnly"

You have to apply this for all the subforms in the adobe form.

All fields will be read only.

Hope this helps.

Rgds,

Sandeep Katoch

Former Member
0 Kudos

Sandeep:

Thank you for your response.

I was able to change the fields to "readOnly", but I had to do it in a different event on the Submit Button and I did with different code. 

The "Submit Button" is not the Email Submit Button in LiveCycle, but a regular Button with Control Type = Submit and the following code in JavaScript to submit for e-mail under Event ready:layout

this.resolveNode("#event.#submit").target = mailto:"=$record.emaildata.value";

I found some documentation that says to not change the form in ready:layout event (which what I was doing with the "readOnly", so I placed the following code (to make all fields readOnly) in the Button's mouseDown event.

// Get the field containers from each page.

for (var i = 0; i < xfa.host.numPages; i++) {

var oFields = xfa.layout.pageContent(i, "field");

var nodesLength = oFields.length;

// Set the access type.

for (var j = 0; j < nodesLength; j++) {

        var oItem = oFields.item(j);

        if (oItem != this) {

        oItem.access = "readOnly";

        }

    }

}

This worked.  Thanks again.

Jim

sandeep_katoch
Contributor
0 Kudos

Hi Jim,

Thats great!!!

Rgds,

Sandeep katoch

Answers (0)