Skip to main content
MartyAtEANI
Participant
January 19, 2017
Answered

Trying to add a Prefix and Suffix to a text Field

  • January 19, 2017
  • 1 reply
  • 5324 views

HI

I have text field in a form where a user enters a 6 digit code, after input I want the six digit code to have EA at the start and .OUT at the end, can this be done?

thanks

This topic has been closed for replies.
Correct answer try67

OK. In that case you can use this code as the field's custom Format script:

if (event.value) event.value = "EA" + event.value + ".OUT";

1 reply

try67
Community Expert
Community Expert
January 19, 2017

Do you want these texts to be an actual part of the field's value, or just to appear as a custom formatting (like a dollar symbols in a price field. The field value is just a number, but the dollar symbol is added to its presentation)?

MartyAtEANI
Participant
January 19, 2017

Hi

its basically a form that would get email to me as an attachment that I can also add information into ans save it, the info will not be exported so it would just be more of an appearance issue

thanks

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
January 19, 2017

OK. In that case you can use this code as the field's custom Format script:

if (event.value) event.value = "EA" + event.value + ".OUT";