Need to have a space removed if nothing in the form

"Is there anything else I can help you with today ?" If I have nothing in the form then there is a space between today and ? .

I have tried to use trim with no luck. Is there any way for me to do this?

Is there anything else I can help you with today {formtext: name=PDx}?

1 Like

Hi Laren!

Are you perhaps hitting space after the name? I have placed this command into my own TextBlaze folder, and it seems to be executing without a space.

Let me know if you have anymore issues!

Malachi

1 Like

Thanks for the response Malachi. I don't have any problem when I put a name in the space, but sometimes I don't want to put a name in there. (If I used it earlier)

1 Like

Thank you for this information Laren! I can confirm that I am not aware of a resolution for keeping the space out besides using another snippet to do so. I hope this information helps!

Malachi

Hi @Laren_Eggleston.

Hope you are doing good. To resolve this issue I use two approaches usually.

  1. The first option is just putting the space inside the formtext. You will need to remember to put the space every time you want to put the name. If you don't insert the name, the question will show appropriately. Something like this.

Is there anything else I can help you with today{formtext: name=PDx}?

  1. The second and my preferred one, is combining the formtext with an if statement, if your formtext is empty it will erase the space, if there is a name, the space will be there, please fell free to copy the snippet and use id to check if it works for you.

{note}
Cx name: {formtext: name=CXname}?
{endnote}

{if: CXname <>""}Is there anything else I can help you with today {=CXname}?{else}Is there anything else I can help you with today?{endif}

Please keep in mind that things inside the note code will not be inside the text when you insert the snippet.

Hope this helps and please let me know if you have any other question.

Kind regards :3

Diego.

2 Likes

Thank you Diego. I was figuring on trying an if statement next. I appreciate the help! :grinning:

2 Likes

Great solution @Diego_Suancha :slight_smile:

1 Like