# Submitting e-Form

## 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
   * "<mark style="color:green;">**valid**</mark>" if the script returns "<mark style="color:blue;">**true**</mark>**"**
   * Empty string if the script failed or no **OnCheckValidity** event script was found

## &#x20;**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`*

## Export**ing**

### 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.](/server-developer/binding-and-exporting.md)

### **ScriptEx()**

Function for Client-side exporting

#### <mark style="color:blue;">**save**</mark> option

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

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

#### <mark style="color:blue;">**save\_memorystream**</mark> option:&#x20;

Convert the form to a MemoryStream in the target format.

```javascript
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,";");    
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://edu.ozeform.io/e-form-developer/day-3/submitting-eform.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
