0

Does anyone know how to populate a dropdown list from a text field with comma-separated data? (using javascript or itext java) iText claims that their apt can not do this. I have seen people talk about using javascript but they do not tell you how to do it.

I know this can be done via a web service and an outside XML file but the customer does not wish to allow for those options

Can someone point me in the right direction?

  • Do you want to do this in a livecycle form rendered as a pdf or are you asking something else ? While designing a livecycle form you can do that. – vdua Apr 09 '13 at 04:26

1 Answers1

0

Put this code in dropdown list initialize event. Remember to replace TextField1 with a proper name.

var arr = TextField1.rawValue.split(",");
for (var i=0;i<arr.length;i++){
    this.addItem(arr[i]);
}
poliglot
  • 204
  • 1
  • 7
  • this is outstanding, thank you. Is there a book or something that I can buy that would teach me more about developing javascript inside of livecycle? – user2191180 Apr 10 '13 at 00:10
  • I don't know any book. You can attend some commercial training. I've personally learnt using [Adobe documentation](http://help.adobe.com/en_US/livecycle/10.0/documentation.html#task=0,1,2,3,4,5,6&module=2) – poliglot Apr 10 '13 at 23:22