Modifiers in New Drag-and-Drop Builder

This article features the new Formstack Documents drag-and-drop builder. This feature is currently in beta testing and has not been deployed to all accounts.

Modifiers allow you to format your Merge Fields. For example, you have created a document with Merge Fields that include numbers, but the data comes through without pretty formatted numbers that include commas to separate the thousands, or you may want to convert a word to all lowercase. For this examples and more modifiers help you format your data in the way you want!

How can I add a modifier to my Merge Field?

When you click on a Merge Field you will see the modifiers options at the right of the Builder

  1. Insert a Merge Field

 

  1. Provide a name to the merge Field in the modal Window

 

 

  1. Click on the Merge Field and you’ll see the modifiers options

 

How to use the Modifier Options?

There are two options to add a Modifier to your Merge Field:

  1. Select one of the preset modifiers from the “Choose From Library” dropdown list

  1. "Build your own modifier" is a text area where you can type the modifier you want to apply to your Merge Field. Please see below the section: Which are the available modifiers?

 

How many modifiers can I apply to my merge Field?

You can use as many modifiers as you need

What is the order on which the modifiers will be applied?

The order of the modifiers you selected will be applied to the Merge Field based on the “Active Modifiers” list and it will be applied top-down.

  • In this example: First the “Capitalize all characters” modifier will be applied and then “Abbreviate words”

 

Which are the available modifiers?

The list below shows a list of examples of what to type on the Build your Own modifier text area. After you type it click on the right arrow to insert it and Save Settings.

 

Name

Description

Example

abbreviation

Convert text to abbreviation (grab first letter of each word)

 

abbreviation:"."

 

add_days

Add days to date

add_days:10

age

Convert date into age (years)

Age

age_to_words

Convert date into age in words

age_to_words

bitly

Convert URL to Bitly link

bitly:"username":"password"

capitalize

Capitalize the first letter of a merge field

capitalize

capitalize_sentences

Capitalize the first word in each sentence

capitalize_sentences

cat

Append text to the end of a merge field

cat:" is ready"

currency_format

Format a currency value

currency_format:"$"

currency_format:'€':2:',':'.'

date_format

Change the format of a date

date_format:"m/d/Y"

For more options, check out www.php.net/date

decimal_to_words

Convert a decimal/number to words

decimal_to_words

default

Set a default value for a merge field

default:"None"

expand_url

Get real URL (follow redirects) from a shortened URL

expand_url

html_safe

Convert characters to HTML safe characters

html_safe

html2office

Convert HTML to Office doc formatting

html2office

html2text

Convert HTML to plain text

html2text

int_number

Convert international number to US format (for calculations)

 int_number

list

List array values in a commas separated list

list:",":"and"

lower

Convert all characters to lowercase

lower

 

markdown2html

Convert markdown to html

markdown2html

money_to_words

Convert price to words

money_to_words

money_to_words:"euro"

nl2

Convert new-line characters to given string

nl2:", "

nl2br

Convert new-line characters to HTML line breaks <br>

nl2br

nl2p

Convert new-line characters to HTML paragraph

nl2p

number

Convert merge field to a number

number

 

number_eu_to_us

Converts a number from EU format to US

number_eu_to_us

number_us_to_eu

Converts a number from US format to EU

number_us_to_eu

number_format

Change the format of a number (commas and decimals)

number_format:2

Example: 5234.35 = 5,234.35

International format (comma for decimal place)

number_to_words

Convert number to words

number_to_words

pad

Pad merge field with the given string, so it is the given length

pad:12:"0"

Example: 123456 = 00000012345

parse_url

Searches string for a URL

parse_url

phone_format

Format a phone number

phone_format:"(%3) %3-%4"

Example: 123-555-7890 = (123) 555-7890

phone_format:"%3.%3.%4"

 Example: 123-555-7890 =123.456.7890

replace

Search and replace a string in a merge field

replace:"Street":"St"

Example: 123 S Main Street = 123 S Main St

round

Round a number to number of decimal places provided

round:2

 

spacify

Insert a space (or string) in between each character in merge field

spacifiy

Example: Thomas = T h o m a s

spacify:"-"

Example: 123456 = 1-2-3-4-5-6

state_abbreviation

Convert US State name to abbreviation

state_abbreviation

strip

Replace all new lines, spaces, and tabs with a single space

strip

strip_tags

Remove all HTML tags from merge field

strip_tags

 

substr

Create a sub-string of the merge field

Substr:0:5

Example: Document = Docum

text2html

Convert text to HTML

text2html

time_to_words

Creates a text representation of the number of seconds

time_to_words

translate

Translate text into another language

translate:"de"

via Google Translate - Languages

truncate

Truncate/shorten the merge field to the given length

truncate:<insert number of characters>

ucfirst

Capitalize the first letter in the first word

ucfirst

ucwords

Capitalize the first letter in each word

ucwords

upper

Convert all characters to uppercase

upper

 

Was this article helpful?
2 out of 2 found this helpful

Comments

0 comments

Please sign in to leave a comment.