How to convert line breaks into spaces after submission?

Hello bubblers

I have a input field where users can input text. However, the space where the text is output has limited size. I want to prevent the users from having line breaks in their text.

Rather than preventing them from using the character, I want to convert any line breaks into single spaces after submission.

However, I’m having trouble figuring out how to do this with workflows. Any suggestions or help would be appreciated!

Use ‘Find & Replace’, and just replace the line breaks with spaces.

Hi there, @mdavirro52… are you using a standard input element (I’m guessing you aren’t, but you didn’t say for sure)? If so, a user can’t enter a line break in that field. If you are using a multiline input, then you can use the :find & replace operator, as Adam said. If you haven’t used that operator before, it can be a bit tricky. In the find field, you will literally press the enter key, and in the replace field, you will type a space.

Best…
Mike

Hi @mikeloc and @adamhholmes thanks for your responses

Maybe I’m missing something but I do not see a Find and Replace option anywhere.

Should I be looking within the Workflow tab under “Make Changes to a Thing”?

Also, yes @mikeloc it is a multiline input.

Thanks

You will use that operator in the expression where you save the input’s value. So, something like… some field = multiline A's value:find & replace

Ahhhh gotcha. It appears to have worked. Thank you!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.