ColdFusion Functions
There are currently 41 Functions in our Library. View our Custom Tags
fm_previewstring
Added on 11-Mar-09
An updated version of the existing fm_previewtext function that trims a string to the nearest complete word. This version is more streamlined and also removes any HTML code from a string before trimming it. This newer version also automatically adds the elipsis (...) to the end of a string if the string is longer than the trim limit.
fm_weekdaydaterange
Added on 26-Feb-07
Returns the number of working days (Monday to Friday) between two given dates.
fm_detectbrowser
Added on 28-Nov-06
Displays the type of and version of the browser viewing the page. If the browser type is not recognised, the function outputs "Unknown".
fm_imageresize
Added on 02-Oct-06
A perfect partner to the fm_imagesize function. Resizes the dimensions of a specified image or variable, keeping the original aspect ratio.
fm_imagesize
Added on 02-Oct-06
Returns the width and height dimensions of a specified image.
fm_swearfilter
Added on 23-Aug-06
Removes all pre-set swear words from a string. Replaces them with an asterisk.
fm_listdelete
Added on 11-Aug-06
Deletes a specific element from a list
fm_listElementPrefix
Added on 19-Jun-06
Adds a specified prefix to each element within a list.
fm_emailinjection
Added on 20-Apr-06
Email injection is a security vulnerability that can occur in internet applications that are used to send email messages. When a form is added to a webpage that submits data to a web application, a malicious user can potentially exploit the MIME format to append additional information to the message being sent, such as a new list of recipients or a completely different message body.
fm_listremovenulls
Added on 26-Jul-05
Removes empty elements from a list
fm_listsum
Added on 01-Jul-05
Similar to the listlen() function but returns the sum value of all elements in a list. For example, #fm_listlen('1,2,3,4')# would return 10
fm_listdistinct
Added on 30-Jun-05
Returns all unique elements in a list. Strips out all of the duplicate elements.
fm_stripnum
Added on 18-Apr-05
Strips all numeric characters from a string.
fm_stripchars
Added on 18-Apr-05
Removes any text characters from a string of data.
fm_hidelinkstatus
Added on 03-Mar-05
Wrapped around a hyperlink, this function will hide the target in the status bar and give you the option to display a custom status bar message. Recently updated for accessibility laws to allow you to display a custom tooltip.
fm_getemailsfromstring
Added on 01-Feb-05
Pulls out a comma delimited list of emails from a specified string
fm_postcodeformat
Added on 31-Jan-05
Determines whether a string is a valid UK postode format. A boolean value - returns true if it is, otherwise returns false.
fm_seasonformat
Added on 24-Jan-05
Returns the seasonal derivitive of a specified date. Ranges Winter, Spring, Summer, Autumn
fm_uniquewordsinstring
Added on 26-Nov-04
Determines the number of specified words in a string.
fm_uniquecharsinstring
Added on 26-Nov-04
Determines how many unique characters (including white spaces) occur in a string.
This function is NOT case sensitive unless specified otherwise.
fm_listalphanumeric
Added on 23-Nov-04
Sorts a list by number order and then alphabetically.
Example:
The input - #fm_listalphanumeric("A,1,B,4,D,3,C,2")#
Will output - 1,2,3,4,A,B,C,D
fm_zipfile
Added on 12-Aug-04
Adds contents of specified directory to a zip file.
fm_previewtext
Added on 11-Aug-03
Prints a specified number of characters from a string without excluding midway through words. Will trim down to the last complete word.
fm_numberscript
Added on 12-Jul-03
Adds the ordinal abbreviation to a number.
fm_excludeafter
Added on 06-Jun-03
Works in the opposite way to the spanexcluding function. Excludes characters before a set.
fm_spanexcluding
Added on 04-Jun-03
A modification of the standard spanexcluding function. This function allows you to specify the number of delimiters to count before excluding characters.
fm_listrand
Added on 16-May-03
Selects a specified number of random elements from a list.
fm_initials
Added on 15-May-03
Pulls out the initials of a name. This function takes the first letter of the full name entered and converts it to upper case to output the initials.
fm_encryptemail
Added on 13-May-03
Encrypts an email address on an html template to protect your website from spammers. Can make address a mailto link.
fm_generatelink
Added on 07-Mar-03
Finds any instance of http, ftp or www in a string and converts it to an a href link. Now modified to convert an email address into a mailto link.
fm_filesize
Added on 19-Feb-03
Displays the size of a specified file in bytes.
fm_longordinal
Added on 28-Nov-02
Converts a date number to it's full string value. For example, 1 would be output as "first".
fm_shortordinal
Added on 28-Nov-02
Converts a day number into its short text format. For example 1 would be output as "1st".
fm_removehttp
Added on 26-Nov-02
Removes any occurrence of "http://" from a web address.
fm_numberformat
Added on 20-Nov-02
Strips out all non-numeric characters from a number. For example, £200,000 will be displayed as 200000.
fm_emailformat
Added on 08-Oct-02
Returns TRUE if a string is in email format.
fm_pcase
Added on 24-Sep-02
Capitalises the first letter in each word. This function has now been updated to remove spurious capital letters and extra spaces. For example "cusTOm TAg" will now be output as "Custom Tag".
fm_poundformat
Added on 23-Sep-02
Converts an integer to a decimal currency value. For example, 4000 will be output as £ 4,000.00
fm_numberasstring
Added on 09-Sep-02
Converts an integer into its string value.
fm_paragraphformat
Added on 08-Sep-02
Modified version of the ColdFusion standard paragraphformat function. This function takes into account line brakes (
tags).
fm_verticaltext
Added on 06-Sep-02
outputs a string of text vertically.