0

I have textfield1 and textfield2, I want to reduce characters after commas in textfield2

example:

textfield1 =

This is mango, the color is green

in textfield2 =

This is mango

I want to use if with initialization / trigger "comma (,)"

If in php like this :

remove everything after first comma from string in php

please help if anyone understands in adobe live cycle

1 Answers1

0

Maybe something like this should do on an exit event.

var originalText      = textfield1.rawValue;
var placeOfFirstComma = originalText.indexOf(",");
var reducedText       = originalText.substring(0, placeOfFirstComma);
textfield2.rawValue   = reducedText; 
Cold_Class
  • 3,214
  • 4
  • 39
  • 82