Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

ConfiForms: How to eliminate "  " when 2+ consecutive spaces occur

Rachel Andrews July 10, 2023

I am using the ConfiForms IFTTT Integration Rules macro to send myself an email notification whenever a user fills out my ConfiForm with their email, project name, etc. The subject of my email contains [entry.programName], where programName is the field where the user inputs their program name. Everything works fine until a user submits multiple consecutive spaces in this field, resulting in an odd email subject name for me. For example, if the user inputs "hello     test     " (5 spaces after each word), I get the following in my email subject, which inevitably messes up my other automated links and whatnot: 

hello     test     

Is there an easy way to keep this from happening, or does this require some complex conditionals in creating this email subject? 

1 answer

0 votes
Alex Medved _ConfiForms_
Community Champion
July 12, 2023

Hi @Rachel Andrews and welcome to this community

You can use the trim function that ConfiForms offers

[entry.field_name.trim()]

https://wiki.vertuna.com/display/CONFIFORMS/Virtual+functions

Alex

Rachel Andrews July 12, 2023

Thanks @Alex Medved _ConfiForms_ ! This works great when the field name is one word, but does not work when I have a multi word input. 

ex: "hello test" needs to be "hellotest" in order to satisfy the trim function when in fact I want to keep it as "hello test"

Alex Medved _ConfiForms_
Community Champion
July 12, 2023

trim function does not trim all the spaces. It only removes leading/trailing spaces from the whole text value

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events