# How to Create a Webster+ Web Page Using a Text File

> Source: https://manual.pvxplus.com/how-to/how-to-create-webster-web-page-using-a-text-file

This tutorial explains how to create the Webster+ Web page shown below using short codes saved in a simple text file. Sample code is provided, followed by a line-by-line explanation.

![A screenshot of a computer

AI-generated content may be incorrect.](https://manual.pvxplus.com/migration-assets/a4fa46a62d418e43440d1b7bbc6c39a30a52d419d62af83c3b69c33dc94941f9.png)

Create the text file as follows:

|  |  |
| --- | --- |
| 1\. | Open a text editor, such as Notepad. |
| 2\. | Copy and paste the following code:<br>\[ttl\]Client File\[/ttl\]  <br> \[form program=MyProg\]  <br> Client ID:  <br> \[input ClientID$ format="000000" tip="Enter Client #" event=FindClient\]  <br>   <br> Name:  <br> \[input Name$ len=30\]  <br>   <br> Address:  <br> \[input Address$ len=30\]  <br>   <br> Address:  <br> \[input City$ len=30\]  <br>   <br> Balance:  <br> \[input Balance format="-###,##0.00"\]  <br>   <br> \[button event=Save text="Save"\]  <br> \[button event=Delete text="Delete"\]  <br> \[/form\] |
| 3\. | Save this as a ***.txt*** file (e.g. HowTo.txt). |

## Code Explanation

This table explains each line of the above code:

| **Line** | **Description** |
| --- | --- |
| **\[ttl\]Client File\[/ttl\]** | The **[\[ttl\]…\[/ttl\]](https://manual.pvxplus.com/webster/short-codes#ttl)** short code sets the window or screen title to "Client File".<br>If no HTML **\<title>** tag exists on the page, the first **\[ttl\]** contents will be used.<br>The contents of the short code will be displayed using the HTML class of **'fm_ttl'**, which by default is bold, larger (120%) font in a gray rectangle. |
| **\[form program=MyProg\]** | The **[\[form\]](https://manual.pvxplus.com/webster/short-codes#form)** short code defines the beginning of the form container. When the form data is submitted, it will be passed to the specified program.<br>The short code option **[\[program=MyProg\]](https://manual.pvxplus.com/webster/short-code-options#program)** defines the specified program, which can be a string variable or a quoted value. |
| **Client ID:** | "Client ID:" is the label.<br>This label, along with the other prompts or labels below, could also have used the **[\[show\]](https://manual.pvxplus.com/webster/short-codes#show)** short code and could have been entered in the format **\[show "Client ID:"\]**. |
| **\[input ClientID$ format="000000" tip="Enter Client #" event=FindClient\]** | The **[\[input var…\]](https://manual.pvxplus.com/webster/short-codes#input)** short code inserts an input field. The value of ***var*** specifies the related variable to receive and set the current value of the input.<br>The short code option **[format="000000"](https://manual.pvxplus.com/webster/short-code-options#format)** enforces a 6-digit numeric input (leading zeros likely applied).<br>The short code option **[tip="Enter Client #"](https://manual.pvxplus.com/webster/short-code-options#tip)** provides a Help tooltip.<br>The short code option **[event=FindClient](https://manual.pvxplus.com/webster/short-code-options#event)** triggers a lookup action when the user completes this field (e.g. presses Enter) to load the client's data. |
| **Name:  <br>Address:** | "Name:" and "Address:" are the labels. |
| **\[input Name$ len=30\]  <br>\[input Address$ len=30\]  <br>\[input City$ len=30\]** | The **[\[input var…\]](https://manual.pvxplus.com/webster/short-codes#input)** short code inserts an input field.<br>The short code option **[len=##](https://manual.pvxplus.com/webster/short-code-options#len)** sets the maximum length on the input to **##** characters. |
| **Balance:** | "Balance:" is the label. |
| **\[input Balance format="-###,##0.00"\]** | The **[\[input var…\]](https://manual.pvxplus.com/webster/short-codes#input)** short code inserts an input field.<br>The short code option **[format="-###,##0.00"](https://manual.pvxplus.com/webster/short-code-options#format)** defines the displayed format for a currency or decimal value, including negative signs, thousands separators (comma), and exactly two decimal places. |
| \[**button event=Save text="Save"\]  <br>\[button event=Delete text="Delete"\]** | The short code option **[event=Save](https://manual.pvxplus.com/webster/short-code-options#event)** triggers the Save function in the **MyProg** program, typically writing the form data to a database.<br>The **[event=Delete](https://manual.pvxplus.com/webster/short-code-options#event)** triggers the Delete function in the **MyProg** program, removing the current client's record. |
| **\[/form\]** | The **[\[/form\]](https://manual.pvxplus.com/webster/short-codes#form)** short code defines the end of the form container. |

## Display in Webster+ (\*obj/webbind Logic)

Webster+ can refer to this text file in the same manner as an HTML page. The URL can set **pg** **$** equal to the text file name (e.g. **pg$**=HowTo.txt), as shown below. You can also define a link in **[Webster+ Setup](https://manual.pvxplus.com/webster/sidebar-links-maintenance)** with an *Action* of *Webpage* and an *Associated Name* of the text file name (e.g. HowTo.txt).

![](https://manual.pvxplus.com/migration-assets/547a63bee92bc2e575763b204524cdbf0ab5caf5a990555d10aede1cdb87ebcd.png)

The **\*obj/webbind** logic will automatically add this template in the "page Contents" section at run time.

\<!DOCTYPE html>  
 \<html lang="en">  
 \<head>  

 \<title>Client File\</title> (webbind converts \[ttl\]Client File\[/ttl\])  

 \</head>  
 \<body>…  

 \<div id="pageContents">\<div>\<p>  

 … (the text file is inserted here)  

 \</body>  
 \</html>

## See Also

**[Short Codes](https://manual.pvxplus.com/webster/short-codes)  
[Short Code Options](https://manual.pvxplus.com/webster/short-code-options)  
[Webster+ HTML Merge/Bind Object](https://manual.pvxplus.com/webster/webster-bind-object)**
