Creating Interactive Templates With dycodoc

<< Click to Display Table of Contents >>

Navigation:  Interactive Documents >

Creating Interactive Templates With dycodoc

Previous pageReturn to chapter overviewNext page

The VPE API offers several methods to create Controls (i.e. Interactive Objects) by code, so your application has the capability to create Controls during runtime by calling functions.

But the preferred way of creating interactive documents should be to use dycodoc, since it makes things much easier and more transparent.

Any of the Controls described in the previous section can be placed in a template using dycodoc. Of course you may use Fields within Controls, but with one obvious limitation in contrast to the non-Controls objects: you may only use one Field per Control. E.g. if you are using an Interactive Text Control, only one Field, for example "$(Name)", may be used within this Control.
This rule applies to every kind of Control implemented by VPE.

Another important point is, how dycodoc manages Radiobuttons and Radiobutton-Groups:

You can not create yourself Radiobutton Groups within dycodoc. Instead, these are created by dycodoc itself automatically and invisibly, while you are placing Radiobuttons on a form.

But how does dycodoc know, which buttons belong to one and the same group?
Well, you can assign each Radiobutton a "Group Name / Associated Field" (in the properties dialog, which will appear when you double-click onto a Radiobutton). There you can insert a Field name you had defined in the FieldStudio before, for example "$(PreferredFood)".

dycodoc keeps track of all Radiobuttons which use the same Field, and creates for each of such Fields a corresponding Radiobutton Group. Each button is automatically associated with its Group. As the Template File is written, dycodoc will also write the Group Object into the Template.