Hey Dorilama, thanks! Appreciate your help because i know zero code but am learning about all of these now! Didn’t know what an array or object or string or any of those is until 2 weeks ago hahaha
What I actually want to do is to transform the string. So I tried putting in the code you included, but it isnt returning the transformed string?
It seems to be succeeding but the output is “undefined” (action 3 result)…
But it doesn’t work? Nothing happens and everything is still small letters. Wanted to use this instead of the workflow option as it’s easier to use and doesn’t require a separate workflow
If you dont need to store it as a capitalized sentence, you could check out this css modifier
The ::first-letterCSSpseudo-element applies styles to the first letter of the first line of a block-level element, but only when not preceded by other content (such as images or inline tables).
p::first-letter {
text-transform: uppercase;
}
depending on your use case, it may be more functional to save/modify the users input vs using CSS to only show the text as capitalized.
In that case. When you initially save the string, you should capitalize the first letter in the workflow that saves the text. You can use CSS to control the visual aspect of the text in the input.
the pattern attribute does not change the value of the input. It can only trigger client side validation (show default browser hints and messages and making the input not valid). The user can still input anything, it only sees the default invalid message.
If you want to actually correct the value, or have more control over the validation you need to use workflows.