New markup syntax recommendation in 1.5.0

Previously, all examples in the DynamicForm.prg and the VFPx documentation for Dynamic Form have used a markup syntax for which used with the following delimiters for attribute names and values:

:attribute => value

However, the Rendering Engine is capable of working with other delimiters, and there have been some requests to make the markup syntax more similar to our native FoxPro coding style. Therefore, starting in ver 1.5.0 the code examples in the DynamicForm.prg file, as well as all code examples here on VFPx will use the new “dot” syntax as follows:

.attribute = value

Please review the sample markup code on the main page to see this newer markup syntax in use.

Note: The original format is still supported and will continue to be supported. And, there are no changes required to use the new or the old format. The Render Engine will examine you markup code to determine which format you are using. Nothing is required on your part to make the “dot” format work. However, you cannot mix the two formats in the same markup block.



Markup Syntax Enhancements (ver 1.4.0 and above)

New enhancements to the Dynamic Form markup syntax allow you to set any property via markup, rather than in FoxPro code.

  • Render Engine properties
  • Dynamic Form properties
  • Container properties

This allows you to entirely configure and drive all properties from the markup, without having to do it through your FoxPro code. A nice feature for cases where you want to store fully configured form definitions in a lookup table, or if you prefer the markup technique better than the FoxPro code technique.

Notice that you only need one field delimiter (pipe character) at the end of the properties list. However, you can include the field delimiter character (pipe character) at the end of each property assignment if you wish.

You will also notice some new custom attributes on the host container which allow you to control a perimeter area around the outsides of the container (.container-margin-top, .container-margin-left, etc.)

Code Sample


Resulting Form

This is a custom-styled mini form based on the markup above. The default form does*not* render with padding around the container edges, does not have colored background on the container, and does not have a grey edge color on the container. These visual styles were added by specifying these attributes in the markup block shown above.


Last edited Oct 29, 2012 at 4:16 AM by mattslay, version 18


No comments yet.