Submitting e-Form

Learn how to validate form input, extract input data from e-Form, and export the form as PDF.

Form Input Validation

GetInformation("INPUT_CHECK_VALIDITY")

  1. The function finds the first button in the current Report which has validation scripts in the OnCheckValidity event.

  2. Run the script and returns

    • "valid" if the script returns "true"

    • Empty string if the script failed or no OnCheckValidity event script was found

Data Extraction

GetInformation("INPUT_JSON_ALL")

  • Extract data in JSON format from all input components of which AllowSending is True

customer-save.ozr

  1. Open customer.ozr

  2. Validation button: Set Visible to "False" for runtime.

  3. Remove or comment out a code line from OnCheckValidity

    _MessageBox("Validation Success", "Save");

  4. Save as customer-save.ozr

Exporting

Client-side vs. Server-side exporting

Client-side exporting

  • Manual export to file with the Viewer SAVE menu

  • Export to file with Viewer API

  • Export to MemoryStream with Viewer API (to send to the server)

Server-side exporting

  • The client extracts input data and sends it to the server

  • OZ Server or Scheduler performs exporting with form and data

👉 For details about server-side exporting, refer to Exporting e-Form to Server.

ScriptEx()

Function for Client-side exporting

save option

Convert the form to a file in the target format and save it on the client.

var param = "export.format=pdf;";
param += "export.mode=silent;";
param += "pdf.filename=customer.pdf;";
OZViewer.ScriptEx("save", param,";");

save_memorystream option:

Convert the form to a MemoryStream in the target format.

var param = "export.format=pdf;";
param += "; export.path=C:\\TEMP;"
param += "; export.filename=temp"; 
param += "; export.mode=silent";
param += "; export.confirmsave=false";
OZViewer.ScriptEx("save_memorystream", param,";");    

Last updated

Was this helpful?