Editing Forms |
Top Previous Next |
The Edit Form Definition dialog is shown when adding or editing Forms from Forms Setup. Other functions where Forms are referenced, such as the Form Selection dialog, may also have a button to directly edit the Form without leaving that function and going through Forms Setup.
Here you can edit all of the components of a Form. There are a few fields you edit directly here, and the main portion of the dialog for editing the "meat" of the Form -- the Form Elements.
Form Name
The name should be descriptive enough for selecting the Form out of a drop-down selection list. Forms will usually be shown in the order they appear in Forms Setup, not alphabetically, so the name doesn't affect the order. Each Form must have a unique name (which is not case-sensitive).
Enabled
The Form can be disabled so that it does not appear in receipt selection lists (just uncheck this option). Technically you could also delete the Form, but it's better to just disable it in case you want to use it later. This is also handy to disable Forms you haven't finished, so the users don't try to use it (giving it a high Access Level may also be helpful for this).
Form Type
There are several Form types to choose from, which primarily determine where the Form will be shown as a selection. For instance a Reservation Receipt format won't be shown if printing a receipt for Unbound Transactions, and Label Forms will only be shown where it's possible to print a labels (where multiple records are involved, e.g. the Reports / Mailing Labels function or Find Customers).
Besides being useful for keeping Forms organized according to their use, some types affect what the Form can contain or what other settings it will have. For instance, only the Receipts Form types can have transactions in them (at least for the normal purposes of showing them in a Transaction Table element). Other special situations are mentioned below.
Labels print multiple "Forms" per page (e.g. one instance for each record in a list), and thus have settings for position, spacing, and the number of rows and columns per page. Of course this technically doesn't have to be just mailing labels -- you could use this for any special Forms where several records need to be printed per page, such as a reservation summary report with many details per reservation that wouldn't fit in a single-row-based Query.
E-mail Form types must have "Text output" for the Printer selection (they can't actually be printed), and "Character positions" for the Format (their elements can't be positioned in absolute coordinates on a page).
The Window Tag type has a special situation -- if the "Print Window Tag" button is used on the Reservation Transactions dialog, it will auto-print the top-most Form with this type. This is a special case where the order of Forms is also important. Note also that Window Tag Forms should always be Reservation-based.
Add-on
If this is checked, you can select one of the "canned" formats as a base for the Form. Nothing about this canned Form can be modified, but you can add elements on top of it. This is a means to make simple add-on changes to one of the canned Forms, and of course it's also how all of the default Forms are set up (ass add-ons with no added elements). Be careful to select an appropriate Form Type for the add-on selected, or else the results may be unpredictable.
If the format of the Form is Character-positions, such as a 3" receipt or E-mail, be aware any elements are added on at the end of the canned Form, not in a specific positions.
Format
The format of a Form determines how things are positioned on it. There are basically two choices -- "Variable positions" (in inches or millimeter units), and "Character positions". Note that the inches / millimeter choices for variable can be changed any time, it won't affect the Form (all Forms are actually stored with inches, and conversions are done only for your convenience in the editing dialogs).
Any Form that's used with a Windows printer driver, e.g. for an ink jet or laser printer, can use the Variable positions format. This allows you to place Form Elements anywhere on a page based using absolute positions, and also allows you to use "Region" elements to sub-divide the Form definition.
The Character position format is primarily for use in E-mail Forms and 3" receipt printer Forms where the direct-to-port functionality is used. Forms with this format must position the Form Elements using character positions (line and character column), and can't use Regions. Generally you want to define the lines of these Forms in order, top to bottom (the same order it's going to be printed), but this isn't strictly required since the Form's output character array is "built" internally before sending it to the printer. Note that a Character format Form must select a printer type of either Text Output or 3 Printer - Direct to Port.
Fixed-Pitch Text
This option only appears/applies if the Form Type is E-mail. When selected, the E-mail will actually be sent as HTML with the "preformatted" tag (<pre>), so that it displays as fixed-pitch text (the user will not see this when sending the E-mail, it's done behind the scenes). This is especially important if the E-mail has a transaction table in it, so that the column with the amount lines up neatly. When previewing the E-mail you will also see it as fixed-pitch text.
Character columns
This is only shown for Character format Forms. An appropriate number of columns should be entered so that the "bounds" of the printer is known. This is important for aligning text (e.g. right-justified or centered), and also for auto-wrapping long text.
For 3" receipts, 40 columns us recommended (though some might only work wit 39 columns).
For E-mail, we suggest using 70 to 80 columns, though it may work also to put 0 or 9999 columns so that text is not wrapped around automatically (assuming the receiver's E-mail program will wrap appropriately) -- and this also assumes that you never use right-justified or centered text, or a Transaction Table.
Trans rows/page
This is only an option for Add-on Forms where a canned receipt is selected. Since these have transaction tables in them (but not as editable elements), you must choose how many rows of transactions can be printed on each page. If the number is too high, transactions may be cut off or overlap text at the bottom of the page. Since some receipts may have a lot of "extra" stuff pushing down the transactions or appearing below it (like credit card info, "Additional sites", or multiple Receipt #'s), it's best to enter a lower number and let it print multiple pages even when there's some extra room.
Printer
This simply determines which printer from the Printer Setup selection is used for printing the Form. If you print everything on a single printer then this may not matter, but it does allow selecting different printers or have different settings for each type of Form. For instance you might prefer to print some Forms in landscape mode and others in portrait mode, so you need to use different Printer selections. Also, Envelopes and of course 3" receipt formats should use the appropriate type.
There are also 4 custom printer selections in case you have special Forms that need specific printer settings.
One of the Printer settings is "Text output (or E-mail)". This must be selected for any E-mail Forms, or any Character-format Forms that don't go to the 3" receipt printer. It can't be used for Variable-format Forms.
Sections (unique pages in a multi-page Form)
The Sections functionality allows for Forms to have multiple pages with different information on each page. Or instance you can create a custom Form with several parts on different pages, and they will all print at once when the Form is printed. Of course most Forms will just have one section.
Note that this does not affect multiple-page printing due to transactions table overflow -- e.g. if it has 2 sections but one section requires 3 pages due to the number of transactions, then it will print that section 3 times (with appropriate transactions) plus the second section, for a total of 4 pages. Of course it also does not affect printing multiple records -- printing a 2-section Form for 3 records will result in 6 pages.
To use the Sections functionality, you need to include the context function ThisFormSection( ) in the Condition Expressions of your Form elements. Ideally, the main Form will simply have one Region for each section (for logically sub-dividing the Form and making the definition of each section easier), and the Condition Expression for each of those will just check for the section. This each Region is only printed for the appropriate section (page) of the Form -- in other words, the Section is the page number of the Form, not counting the effects of transactions tables overflowing.
For instance: ThisFormSection( ) = 1 for the first section, and ThisFormSection( ) = 2 for the second section. If you include this in the region's condition, then there is no need to include it in every element contained in each region.
If the Form is an Add-on Form, the receipt type selected will only be in section 1. So you can add an additional custom section to a canned receipt format, but you cannot create a multi-section Form containing more than one canned format.
Access Level
This is used to restrict Forms to certain operator access levels, for instance if you don't want store clerks to be able to print Window Tags. Just select the minimum access level you want to be able to print the Form.
Base Table
The base table determines the primary data table of the Form -- that is, what type of record this Form is going to show information about. This is mostly used for two things -- where the Form is displayed as an option. and what context functions are available for expressions. Any table in the database may be selected, but only a couple are used for most situations -- Reservations and Customers. If you use the Point of Sale, you might also have Forms for Vendors and Inventory Items.
When printing reservation receipts, for instance, only Forms with "Reservations" as the base table can be displayed (selections are also limited by the Form Type as described above). When using Print from Customer Details, the Form Selection dialog will only show "Customers" based Forms, and so forth.
Regarding the context functions, these follow the general rules for expressions. For instance if "Customers" is the base table, then only ThisCust is useful. If "Reservations" is the base table, then you can use ThisResv, ThisCust, ThisSite, and ThisPark, because the Form is assumed to be in the context of a reservation and all of that information is known for a reservation. For some tables, such as Inventory Items, only ThisRecord is useful (the generic record context function).
E-mail Subject Expression
If the Form Type is "E-mail", then this option will be available where you can enter an expression to be used in the Subject line of the E-mail. If this is blank, then the subject specified in the SMTP setup will be used. Otherwise the expression is executed for the applicable context and the result (assumed to the text) will be used for the subject. If you simply want to specify text, then enter the quoted text as the expression, like this: "Thank you for visiting". However you can also include reservation-specific information using the expression, like: "Thank you for visiting, " + Cust:Cust_First_Names.
Attach File(s)
If the Form Type is "E-mail", then this option will be available where you can select one or more files that will always be attached to the E-mail.
Caution! The file selection is stored with the specific path on your computer. If you're using more than one computer, or move the database to another computer later, then you need to make sure that the file path will still be correct and that the files exist on the other computer(s). The files are not part of your database so they will not transfer automatically.
Save & Test Form
This function does a test Print of the Form, showing a Print Preview window first. This can be used to test the Form repeatedly without completely exiting the Edit function.
You should be able to do most testing just in the preview without actually printing (Close the preview to avoid printing the Form), though some details will require printing to see the actual result. For instance if text seems to be too long or gets cut off, or lines in a table seem to be obscured by text, this could just be an inaccuracy in the preview.
Be aware that it does completely save any changes you've made to the Form as soon as you click the button, so it negates any possibility of cancelling changes you've made.
Records (for testing)
There's a Records setting next to the Save & Test Form button, which determines how many records (of the given Base Table) are used for testing. Thus if it's set for 10 records, it will attempt to print the Form for 10 reservations, or Customers, or whatever the base table type is. The default is always 10 records, so if you need more or less, be sure to change it before testing. This number will be remembered for each Form.
This is especially useful for Label Forms, but also handy for other Forms. For full-page Forms, this means that multiple pages will be printed -- in the Preview window, use the "Next page" button to step through them. This is a handy way to check Forms for several situations at once, e.g. different types of reservations with different numbers of transactions. But be careful if you actually Print -- it may print more pages than you realize!
Note that it always uses the most recent records for testing, starting from the last record. For instance it will test using the last 10 reservations entered (assuming 10 is entered for records, and "Reservations" base table). This allows you to add some test reservations before testing and it will use those. If you need to test with a specific record, you can go to the editing function for that record (e.g. Customer Details), and print from there using the normal functionality (be sure to enable "Always preview before printing" in Printing Options / Receipts so that you get a preview).
As E-mail (for testing)
For any Forms with "E-mail" as the Form type, this option will appear next to the Save & Test Form button. When this is checked, the Form will be tested in an E-mail window instead of a Print Preview window. This shows it in the proper context, but this also limits testing to a single record. Note that it will be tested with the most recent Reservation for which the customer has an E-mail address (or if the Base table is Customers for this form, then the most recent Customer record with an E-mail address is used.).
Note that E-mail Forms tested in the Print Preview window will be limited to one page -- anything more than that is cut off. This is because an E-mail Form (or any Character-format Form) is assumed to be unlimited length so it cannot split it up into multiple pages.
Notes
You can enter any notes for yourself here, or use this as a description of the Form -- they're only seen here and in the list in Forms Setup.
Additional Topics:
Importing and Editing Sample Forms
Advanced Customizations Overview & other topics