Content Control Elements

@cc-checkbox

  • parameters:

    • checked? (true/false)

    • optional name (text) — this is an advanced parameter that you can probably ignore

  • creates an MS Word Content Control checkbox form field that is checked or unchecked

  • see also: @checkbox

This function creates a Content Control checkbox in MS Word (optionally containing the specified internal name, which will show up as a hint towards the end-user in Microsoft Word).

Tip: when using form fields, you will probably want to protect the resulting MS Word document, so that only forms can be completed by the end-user.

Tip: You may also want to check out @checkbox, for the traditional (legacy) version of a checkbox form field. See the discussion on the new approach to form controls of MS Word.

@cc-combobox

  • parameters:

    • list of texts (or list-of-text datafield)

    • optional index or text of the selected text item

    • optional name (text) — this is an advanced parameter that you can probably ignore

  • creates a” Content Control” MS Word dropdown form field containing the specified text items

  • see also @listbox and @cc-listbox

This function creates a “Content Control” dropdown list form field in MS Word that contains the specified text items. Note that, unlike @listbox and @cc-listbox, Microsoft Word will allow the end-user to choose his/her own text item, in addition to the predefined text-items in the dropdown list.

When the (optional) second parameter is not passed, the first item will be selected in MS Word; if you want to have some other item preselected, you can either pass the (one-based) index of the item to select, or the text of the item you want to select. Optionally you can also pass a third parameter containing the specified internal name, which will then show up in the form field’s options inside MS Word.

For example, both @cc-combobox(@list("alpha", "beta", "gamma"), "beta") and @listbox(@list("alpha", "beta", "gamma"), 2) create a dropdown-list in MS Word, with the second item (beta) being selected.

Tip: when using form fields, you will probably want to protect the resulting MS Word document, so that only forms can be completed by the end-user.

Tip: While there are probably limited reasons to do so, you may instead want to choose the traditional (legacy) form control @listbox instead of the “Content Control” new approach to form controls of MS Word.

@cc-datebox

  • parameters:

    • optional date datafield (or date value)

    • optional name (text) — this is an advanced parameter that you can probably ignore

  • creates a “Content Control” MS Word form field containing the optionally specified parameter

  • see also: @cc-datebox

This function creates a “Content Control” box in MS Word that optionally contains the specified date value (it will be empty when no parameters are passed). Optionally you can also pass a second parameter containing the specified internal name, which will then show up in the form field’s options inside MS Word.

Unlike @datebox, Microsoft Word will present a nice calendar dropdown box that will allow end-users to easily choose the desired date. Furthermore, when a new date is selected by the end-user, it will be automatically formatted in accordance with the (short date) styling preferences. @cc-datebox will therefore most likely be preferred over @datebox.

Tip: when using form fields, you will probably want to protect the resulting MS Word document, so that only forms can be completed by the end-user.

Tip: You may instead want to choose the traditional (legacy) form control inserted through @datebox instead of the “Content Control” new approach to form controls of MS Word.

@cc-listbox

  • parameters:

    • list of texts (or list-of-text datafield)

    • optional index or text of the selected text item

    • optional name (text) — this is an advanced parameter that you can probably ignore

  • creates a” Content Control” MS Word dropdown form field containing the specified text items

  • see also @listbox and @cc-combobox

This function creates a “Content Control” dropdown list form field in MS Word that contains the specified text items. Note that, unlike @cc-combobox, the end-user can only choose the predefined text-items from the dropdown list in MS Word. Accordingly, Microsoft Word will not allow the end-user to choose his/her own text item instead of the predefined text-items in the dropdown list.

When the (optional) second parameter is not passed, the first item will be selected in MS Word; if you want to have some other item preselected, you can either pass the (one-based) index of the item to select, or the text of the item you want to select. Optionally you can also pass a third parameter containing the specified internal name, which will then show up in the form field’s options inside MS Word.

For example, both @cc-listbox(@list("alpha", "beta", "gamma"), "beta") and @listbox(@list("alpha", "beta", "gamma"), 2) create a dropdown-list in MS Word, with the second item (beta) being selected.

Tip: when using form fields, you will probably want to protect the resulting MS Word document, so that only forms can be completed by the end-user.

Tip: While there are probably limited reasons to do so, you may instead want to choose the traditional (legacy) form control @listbox instead of the “Content Control” new approach to form controls of MS Word.

@cc-multiline-textbox

  • parameters:

    • optional text datafield (or text value)

    • optional name (text) — this is an advanced parameter that you can probably ignore

  • creates a “Content Control” MS Word form field containing the optional textbox, which can potentially span across multiple lines

  • see also @textbox, @cc-textbox, @cc-plaintextbox

This function creates a box in MS Word that optionally contains the specified text value (it will be empty when no parameters are passed). Optionally you can also pass a second parameter containing the specified internal name, which will then show up in the form field’s options inside MS Word.

Note that unlike @cc-textbox and @cc-plaintextbox, this textbox can contain multiple paragraphs as content. Accordingly, please be aware that this box is treated by Clause9 as a separate paragraph in the final output in MS Word — i.e., you will almost always want to put the call to @cc-multiline-textbox in its own separate paragraph

Unlike @cc-plaintextbox, the end-user can freely format the text inside the textbox with bold, italic, etc.

Tip: when using form fields, you will probably want to protect the resulting MS Word document, so that only forms can be completed by the end-user.

Tip: You may instead want to choose the traditional (legacy) form control inserted through @textbox, instead of the “Content Control” new approach to form controls of MS Word.

@cc-plaintextbox

  • parameters:

    • optional text datafield (or text value)

    • optional name (text) — this is an advanced parameter that you can probably ignore

  • creates a “Content Control” MS Word form field containing the optional textbox

  • see also @textbox, @cc-textbox and @cc-multiline-textbox

This function creates a “Content Control” box in MS Word that optionally contains the specified text value (it will be empty when no parameters are passed). Optionally you can also pass a second parameter containing the specified internal name, which will then show up in the form field’s options inside MS Word.

Unlike @cc-textbox and @textbox, the end-user cannot freely format the text inside this box — the formatting can be changed, but any formatting change will uniformly apply to all characters in the box.

Tip: when using form fields, you will probably want to protect the resulting MS Word document, so that only forms can be completed by the end-user.

Tip: You may instead want to choose the traditional (legacy) form control inserted through @textbox, instead of the “Content Control” new approach to form controls of MS Word.

@cc-textbox

  • parameters:

    • optional text datafield (or text value)

    • optional name (text) — this is an advanced parameter that you can probably ignore

  • creates a “Content Control” MS Word form field containing the optional textbox

  • see also @textbox, @cc-multiline-textbox and @cc-plaintextbox

This function creates a “Content Control” box in MS Word that optionally contains the specified text value (it will be empty when no parameters are passed). Optionally you can also pass a second parameter containing the specified internal name, which will then show up in the form field’s options inside MS Word.

Note that unlike @cc-multiline-textbox, this textbox cannot contain paragraphs as content. Unlike @cc-plaintextbox, the end-user can freely format the text inside the textbox with bold, italic, etc.

Tip: when using form fields, you will probably want to protect the resulting MS Word document, so that only forms can be completed by the end-user.

Tip: You may instead want to choose the traditional (legacy) form control inserted through @textbox, instead of the “Content Control” new approach to form controls of MS Word.

@checkbox

  • parameters:

    • checked? (true/false)

    • optional name (text) — this is an advanced parameter that you can probably ignore

  • creates an MS Word checkbox form field that is checked or unchecked

  • see also: @cc-checkbox

This function creates a checkbox in MS Word (optionally containing the specified internal name, which will show up in the form field’s options inside MS Word).

Tip: when using form fields, you will probably want to protect the resulting MS Word document, so that only forms can be completed by the end-user.

Tip: You may also want to check out @cc-checkbox, for the “Content Control” version of a checkbox, which uses the new approach to form controls of MS Word.

@currencybox

  • optional parameters:

    • currency datafield (or currency value)

    • the number of decimal places (digits after the comma/period)to enforce upon numbers inserted by the end-user in the .DOCX file

    • the currency to enforce upon numbers inserted by the end-user in the .DOCX file

    • name (text) — this is an advanced parameter that you can probably ignore

  • creates an MS Word form containing the optionally specified parameter

  • see also: @cc-currencybox, @checkbox, @datebox, @listbox, @nrbox and @textbox

This function creates a box in MS Word that optionally contains the specified currency value (it will be empty when no parameters are passed).

Optionally you can also specify the number of decimal places and the currency to enforce when the end-user inserts a number in the .DOCX file. When these parameters are not explicitly passed:

  • For the decimal places, the corresponding values of the currently applicable styling will be used (for which the platform’s default is 4 decimal places). Note that MS Word only allows a fixed number of decimal places, and does not allow dropping unnecessary zeroes (e.g., if 2 decimal places would be used, then a value such as 6 EUR will get formatted as 6,00 EUR in metric style, or 6.00 in imperial style).

  • For the currency, the platform’s default currency will be used (e.g., euros in the Belgian and French jurisdictions, British Pounds in the UK jurisdiction, and US Dollars in the US jurisdiction).

A final optional parameter contains the specified internal name, which will then show up in the form field’s options inside MS Word.

Examples:

  • @currencybox(5 EUR) will insert a box that contains the value “5 EUR”. When the end-user would insert a new value into that box, it will get formatted with the number of digital places indicated by the platform (probably 4) and the platform’s default currency (e.g., EUR on a server for the French jurisdiction; depending on the styling setting, it may also become the Euro-symbol and get printed before/after the number).

  • @currencybox(5.02 GBP, 2, "GBP") will insert a box with value “5.02 EUR”. When the end-user would insert a new value into that box (e.g. the number 6), it will get formatted with 2 decimal places and currency GBP — so for example 6.00 GBP or £6.00, depending on the applicable styling settings.

Tip: when using form fields, you will probably want to protect the resulting MS Word document, so that only forms can be completed by the end-user.

Tip: You may also want to check out @cc-currencybox, for the “Content Control” version, which uses the new approach to form controls of MS Word.

@datebox

  • parameters:

    • optional date datafield (or date value)

    • optional name (text) — this is an advanced parameter that you can probably ignore

  • creates an MS Word form field containing the optionally specified parameter

  • see also: @cc-datebox

This function creates a box in MS Word that optionally contains the specified date value (it will be empty when no parameters are passed). Optionally you can also pass a second parameter containing the specified internal name, which will then show up in the form field’s options inside MS Word.

Note that what actually gets inserted, is a simple text box in which the user can specify a date. However, whatever the user is inserting, is not validated or reformatted by MS Word. You may therefore want to check out @cc-datebox instead, which uses the new approach to form controls of MS Word.

When using @cc-datebox, instead of @datebox, Microsoft Word will present a nice calendar dropdown box that will allow end-users to easily choose the desired date. Furthermore, when a new date is selected by the end-user, it will be automatically formatted in accordance with the (short date) styling preferences. @cc-datebox will therefore most likely be preferred.

Tip: when using form fields, you will probably want to protect the resulting MS Word document, so that only forms can be completed by the end-user.

@listbox

  • parameters:

    • list of texts (or list-of-text datafield)

    • optional index or text of the selected text item

    • optional name (text) — this is an advanced parameter that you can probably ignore

  • creates an MS Word dropdown form field containing the specified text items

  • see also @cc-listbox and @cc-combobox

This function creates a dropdown list form field in MS Word that contains the specified text items. Note that, unlike the “Content Control” @cc-listbox and @cc-combobox (which rely on the new approach to form controls in MS Word), there is a maximum of 25 text items that can be inserted.

Also note that, unlike @cc-combobox, the end-user can only choose the predefined text-items from the dropdown list in MS Word. This traditional form field will not allow the end-user to choose his/her own text item, instead of the predefined text-items in the dropdown list.

When the (optional) second parameter is not passed, the first item will be selected in MS Word; if you want to have some other item preselected, you can either pass the (one-based) index of the item to select, or the text of the item you want to select. Optionally you can also pass a third parameter containing the specified internal name, which will then show up in the form field’s options inside MS Word.

For example, both @listbox(@list("alpha", "beta", "gamma"), "beta") and @listbox(@list("alpha", "beta", "gamma"), 2) create a dropdown-list in MS Word, with the second item (beta) being selected.

Tip: when using form fields, you will probably want to protect the resulting MS Word document, so that only forms can be completed by the end-user.

@nrbox

  • optional parameters:

    • (whole or floating point) number datafield / value

    • the number of decimal places (digits after the comma/period)to enforce upon numbers inserted by the end-user in the .DOCX file

    • name (text) — this is an advanced parameter that you can probably ignore

  • creates an MS Word form containing the optionally specified parameter

  • see also: @currencybox and @textbox

This function creates a box in MS Word that optionally contains the specified value (it will be empty when no parameters are passed).

Optionally you can also specify the number of decimal places. When it is ommitted, then the corresponding values of the currently applicable styling will be used (for which the platform’s default is 4 decimal places). Note that MS Word only allows a fixed number of decimal places, and does not allow dropping unnecessary zeroes (e.g., if 2 decimal places would be used, then a value such as 6 will get formatted as 6,00 in metric style, or 6.00 in imperial style).

A final optional parameter contains the specified internal name, which will then show up in the form field’s options inside MS Word.

Examples:

  • @nrbox(5) will insert a box that contains the value “5”. When the end-user would insert a new value into that box in MS Word, it will get formatted with the number of digital places indicated by the platform (probably 4).

  • @nrbox(5.02, 2) will insert a box with value “5.02”. When the end-user would insert a new value into that box (e.g. the number 6), it will get formatted with 2 decimal places — so for example 6.00 or 6.00, depending on the applicable styling settings.

Tip: when using form fields, you will probably want to protect the resulting MS Word document, so that only forms can be completed by the end-user.

@textbox

  • parameters:

    • optional text datafield (or text value)

    • optional name (text) — this is an advanced parameter that you can probably ignore

  • creates an MS Word form field containing the optional textbox

  • see also: @checkbox, @currencybox, @datebox, @listbox and @nrbox

This function creates a box in MS Word that optionally contains the specified text value (it will be empty when no parameters are passed). Optionally you can also pass a second parameter containing the specified internal name, which will then show up in the form field’s options inside MS Word.

Tip: when using form fields, you will probably want to protect the resulting MS Word document, so that only forms can be completed by the end-user.

Tip: You may also want to check out @cc-textbox, @cc-plaintextbox and @cc-multiline-textbox for the “Content Control” versions of text boxes, which uses the new approach to form controls of MS Word.

Last updated