~%WhatToEnter, WTE

Description

When you insert a template, this macro opens a dialog window and asks you to:

  • enter some text into a text box
  • or select one of the several specified items from a dropdown list
  • or select a date from the calendar
  • or select a time
  • or select a row from the specified dataset.

Then the macro inserts the entered text or selected item into the current macro position. The WTE macro can be nested into most of the Shared Email Templates macros, including other WTEs. All the WTE macros of the same nested level are aggregated into one dialog box.

Note. The HTML icon above an input field in the macro dialog window means that HTML is supported, so you can enter a piece of HTML code into the field.
Here is the HTML icon.

Syntax

~%WhatToEnter{
     "type":"text" | "dropdown" | "calendar" | "time" | "dataset",
     "title":"textvalue",
     // in case of text
     "defaultValue":"textvalue",
     "required":"true" | true | "false" | false,
     // in case of dropdown
     "items":[ "textvalue1", "textvalueN" ],
     [ "defaultItem":"1" | 1 ],
     [ "editable":"true" | true | "false" | false,
        [ "required":"true" | true | "false" | false, ]
     ]
     [ "multiselect":"true" | true | "false" | false,
        [ "separator":"textvalue" ] // default separator is comma
     ]
     // in case of calendar
     [ "editable":"true" | true | "false" | true,
        [ "required":"true" | true | "false" | false, ]
     ]
     [ "format":"textvalue", ]
     [ "locale":"textvalue", ]
     [ "dateDelta":numbervalue ]
     // in case of time
     [ "format":"textvalue", ]
     [ "locale":"textvalue", ]
     [ "timeDelta":numbervalue ]
     // in case of dataset
     "dataset":"textvalue",
     "column":"textvalue"
}

Works for

  • Email templates.
  • Appointment and meeting templates.
  • Mail Merge templates.

Using a text box

  • title—to specify the title of the text box
  • defaultValue—to specify the default value of the text box
  • required—to set up if the user is required to fill out the text box.

Examples of use

~%WhatToEnter{
     "type":"text",
     "title":"Test title",
     "defaultValue":"test default value",
     "required":false
}

Using a dropdown list

  • title—to specify the title of the dropdown list
  • items—to specify the items on the dropdown list
  • defaultItem—to specify the index of the default item
  • editable—to enable the user to edit the text directly in the dropdown box, otherwise the user will only be able to select an item or items from those listed
  • required—to set up if the user is required to fill out the dropdown box
  • multiselect—to enable the user to select several items
  • separator—to specify a separator for dividing items if two or more items are selected.

Examples of use

~%WhatToEnter{
     "type":"dropdown",
     "title":"Test title",
     "items":["item 1","item 2"],
     "defaultItem":1,
     "editable":false,
     "required":false,
     "multiselect":false,
     "separator":";"
}

Using the Calendar control

  • title—to specify the title of the calendar control
  • editable—to enable the user to edit the text directly in the calendar box, otherwise the user will only be able to select a date from the pop-up calendar
  • format—to specify the date format. (It can be omitted if the DateFormat property exists.)
  • locale—to specify the locale for spelled days and months. (It can be omitted if the DateLocale property exists.)
  • dateDelta—to specify the number of days to be added to the selected date or subtracted from it.

Examples of use

~%WhatToEnter{
     "type":"calendar",
     "title":"Test title",
     "editable":false,
     "required":false,
     "format":"yyyy-mm-dd",
     "locale":"ja-JP",
     "dateDelta":0
}

Using the Time control

  • title—to specify the title of the time control
  • format—to specify the time format
  • locale—to specify the locale for time format
  • timeDelta—to specify the number of minutes to be added to the selected time or subtracted from it.

Examples of use

~%WhatToEnter{
     "type":"time",
     "title":"Test title",
     "format":"hh:mm",
     "locale":"en-US",
     "timeDelta":0
}

Using a dataset

  • title—to specify the title of the dataset selection
  • dataset—to specify the dataset name
  • column—to specify the column name.

Examples of use

~%WhatToEnter{
     "type":"dataset",
     "title":"Test title",
     "dataset":"Store list",
     "column":"address"
}

Deprecated macros

  • WhatToEnter

Post a comment

Seen by everyone, do not publish license keys and sensitive personal info!

If you have any questions or issues with this add-in, please feel free to post your concerns in the comments area. As soon as we answer, a notification message will be sent to your e-mail. If you do not want to share your thoughts in public, please contact us at support@ablebits.com.