Custom controls

Introduction

Sample custom controls

The custom controls are added to the Header and Line screens, and the data is filled in by the user. These controls can be header text, spinners (drop-down lists), checkboxes and text. The example above shows header text, a checkbox and a text field.

The header text (in this case “Extras”) creates a block for the controls that follow it, and gives it a name. The data from the other controls is joined together, and stored in the custom fields of the corresponding Order and Order Details records.

In the example shown above, the custom field would contain the string “1|VC”. Here the 1 says that the Gift Wrap checkbox is checked , the | symbol is a field separator, and “VC” is the value of the Voucher Code.

Custom table

Custom table
Sample Custom table

The custom controls are defined in the Custom table. This is populated on the web server, and is downloaded to client devices, along with the rest of the company data.

The system administrator defines the custom controls used by the company, by either uploading a CSV file or editing the table directly. The Table Layouts describes the use of this table.

History

  1. My first attempt to implement this feature was very poor, and did not involve the web server at all.
  2. My second attempt was much better, and used a new table, which I called Custom.
  3. For some reason, I forgot to expose the new table in the admin site (or at least I think that is what happened).
  4. This meant that custom controls could not be used in the hosting service.
  5. I have only just realised this, but the table is now fully visible.
  6. I have added this post, by way of apology.

Author: Philip Sheard

Philip Sheard has been working in IT for over 40 years, and on this project for the last 20. His current skills include Java, Android, Objective-C, iOS, PHP, MySQL, ASP.Net, SQL Server, HTML, CSS, Apache and WordPress.