Hi all
as above, is there a way to do this?
cheers…
The following is the answer from the Tap Forms Assistant custom GPT:
Yes, you can autocapitalize the first word in a text field in Tap Forms by adjusting the capitalization settings for that field. Tap Forms provides a property for text fields called Capitalization, which can be set to None, Words, or All Characters. By selecting the Words option, the first letter of each word entered into the text field will be capitalized automatically.
You can access this setting by editing the field properties of a text field. For more details on how to adjust these field properties, refer to page 25 of the manual .
If you need further guidance on customizing field behaviors, let me know!
(You can explore more about this GPT here: https://chatgpt.com/g/g-aGOEAlajR-tap-forms-5-assistant)
Many thanks, but I only want the first word capitalised, not all of them.
ie as in a proper sentence.
Cheers…
You can do this with a field script that formats your field whenever you change it. You need to update the text_id variable to point to your text field. I would recommend to hide the field script in order not to clutter the default view.
function capitalizeFirstLetter(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
function Text_Formatter() {
var text_id = 'fld-b6f734989f3742c8b6d1ad301eefea32';
let text = record.getFieldValue(text_id);
text = capitalizeFirstLetter(text.toLowerCase());
record.setFieldValue(text_id, text, false);
document.saveAllChanges();
return text;
}
Text_Formatter();
I noticed that the script wasn’t triggered when I first created it. Closing and reopening the TapForms document fixed it!