Hi. I have a formtext field that may have spaces. How can i replace any occurence of spaces with /
I have tried:
{if: contains(conversion," ")}{=replace(conversion," ","/ ")}{endif}
Thanks
It looks like you have an extra space after your "/". You'll want something like this:
{formtext: name=input; default=This is a sentence with spaces.}
{=replace(input," ","/")}
Thanks, the conversion works but how do I get the original {=conversion} to have the updated version with /
Hi, you will probably want to assign the replaced version to a new variable and use that new variable.
For example:
{formtext: name=input; default=This is a sentence with spaces.}
{input_cleaned=replace(input," ","/")}
Cleaned input: {=input_cleaned}
Thanks Scott - working now.