JS functions index

Last updated Aug 29 2021

Even Though FormTitan is not a coding platform, but rather a Clicks based tool we do allow using Javascript in certain places, like in the condition results, or calculated field. And since we always like to make things easy for our users we decided to insert a list of ready-made functions to the JS editor, that you can simply use instead of having to write the code yourself.


So, in fact, all a user needs to do is
:

- Choose the function he needs from the list.
- Delete the functions he does not need from the window.
- Remove the comment slashes from the function so it is no longer a comment.
- Save it.

The JS functions are:
1- Close a modal windowwindow.FTCloseModal();
2- Get a field value by ID - window.ftGetValueByID(fieldID, isAdvanced);
3- Set a field value by ID - window.ftSetValueByID(fieldID, value);
4- Get list of hidden fields - window.ftGetHashHiddens();
5- Set CSS for element, applyTo: Label, Element, All - window.ftSetCSSElement(fldID, applyTo, className);
6- Get CSS by field ID, applyTo: Label, Element - window.ftGetCSSElement(fldID, applyTo);
7- Close modal and refresh its opener - window.FTReloadParent();
8- Logout from SmartV - window.FTSmartVLogout();
9- Logout from SSO - window.FTSSOLogout();
10- Get age from date - window.ftGetAge(fieldID, format);
11- Get diff days from 2 dates - window.ftGetDiffDays(fieldIDFrom, fieldIDTo, format);
12- Get diff months from 2 dates - window.ftGetDiffMonths(fldIDFrom, fieldIDTo, format);
13- Get diff years from 2 dates - window.ftGetDiffYears(fldIDFrom, fieldIDTo, format);
14- Get diff months from 2 dates without days  - window.ftGetDiffMonthsWithoutDays(fldIDFrom, fieldIDTo, format);

15- Get diff days from date field and now - window.ftGetDiffDaysFromNow(fieldID, format);

16- Get diff months from date field and now - window.ftGetDiffMonthsFromNow(fieldID, format);
17- Get diff years from date field and now - window.ftGetDiffYearsFromNow(fieldID, format);
18- Get count of comma in field - window.ftGetCommasCount(fieldID);
19- Get number of words in field - window.ftGetNumberOfWords(fieldID);
20- Get sum of repeated fields - window.ftGetSum(fieldID);
21- Format a date - window.ftFormatDate(fieldId, format);
22- Get comma separated values from repeat - window.ftGetCommaSeperated(fieldId);



Enjoy!


CommentsLogin Required
Didn’t find what you were looking for?
Try the following for assistance or Use the Search box.