Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Sharing Info: "How to" populate a static List Box as a scrolling text boxes

Avatar

Former Community Member
The following is kind of a blurb in "LiveCycle for Dodos" (like me.) After sharing this, perhaps some of those who "really" know how to do this will give us a better step by step way.<br /><br />Problem:<br />In my form I actually wanted nothing more than a scrolling text box (not a form field), populated with a long list of items, a text box with a small page footprint, something my users could scroll through and review prior to answering their next form question. The list of items needed in that scrolling text box was about 100. I didn't want to use the List Box feature to type these list items in one by one. BUT? How could I populate this List Box, making it as a scrolling text box, with my limited knowledge?<br /><br />PUNT: My solution was a punt. I'm sure there is a "better way," but I certainly couldn't find it anywhere I looked. There was certainly no simple step by step stample that I could try. I'm nearly braindead with using LC, xml and/or importing "list box" items -- I thought this program might be more user friendly. Why can't a simple text file be imported into a List Box? Better yet, why no simple way to make a scrolling text box?<br /><br />Okay... I tried to use the File/New Data Connection/XML Schema thing (thinking I might have figured out how to write an xml file and bring a list of items into a form object), but then I saw the need for an ".xsd" file. All I could think is, "I barely figured out how to write the xml file, now what is this xsd need and how do I write one of these files?" Even after I had accomplished "some" movement by bringing in some form objects via an xsd file (16 hours of trying to learn later), I still couldn't figure out how to populate a List Box with a static list of items. Unbelievable!<br /><br />I tried the LC helps. If you look at the "list boxes, populating" Help item, and IF you can figure out how to accomplish what they are saying, you are far smarter than I! Finally, I tried something else...<br /><br />SOLUTION:<br />Created a test form file, using a List Box, to try and accomplish something like what I wanted.<br />1. Create a blank worksheet.<br />2. Make sure to select menu items "View/XML Source" so that the XML tab/panel can be viewed/accessed in the work area.<br />3. Use the Library palette (Windows/Library) to drag/drop a List Box object onto the form. After doing so, click the List Box's field name tab and type in a brief and easily recognizable field name ("X" or "Illnesses" or "YadaYada").<br />4. With the List Box item still selected, use the Object palette (Window/Object), click the "Field" tab.<br />5. Look at the items within that tab's dialog box and, next to "List Items," click the "+" sign to add a few simple/quick, easily recognizable "testing" list items. Keep them brief, they can be replaced later. I entered list items of "apples," "bananas" and "pears."<br />6. Still within the Object palette, click the Binding tab, click to "checkmark" the box in front of "Specify Item Values." Now then, double click each value in the list and empty it (delete any values so there are none. I really didn't want a form field with values, just a scrolling text box, I didn't have a better solution so I blew away the values).<br />7. Now, looking in the area where you are designing your form, you see tabs "Design View" and "Master Pages." You should also see a tab "XML Source," click it! Once in that flock of XML code, scroll down to locate the words >>field name="X"<< (where X is the field name you gave to your List Box.)<br />8. After locating your List Box's field name, scroll down a bit further until you find "<items>" Beneath that, you will see the list of "items" you entered. For example for my list item entries:<br /><br /><items><br /><text>apples</text><br /><text>bananas</text><br /><text>pears</text><br /></items><br /><br />Go to next message
1 Reply

Avatar

Former Community Member
UGH... The above message did not place certain code as expected. Please stop after item 6 above, and continue with item 7 here. Unfortunately the forum software didn't allow me to correct the subject of this thread nor the first message.



I am putting the rest of the message in the following. I have replaced < with a [ and > with a ] because I can't remember the html code for inserting < and > in this software :)



7. Now, looking in the area where you are designing your form, you see tabs "Design View" and "Master Pages." You should also see a tab "XML Source," click it! Once in that flock of XML code, scroll down to locate the words >>field name="X"<< (where X is the field name you gave to your List Box.)



8. After locating your List Box's field name, scroll down a bit further until you find "[items]" Beneath that, you will see the list of "items" you entered. For example for my list item entries:



[items]

[text]apples[/text]

[text]bananas[/text]

[text]pears[/text]

[/items]



9. This step is when you prepare YOUR List Box items, such that you can get them into that List Box.



Using a text editor, prepare the list items you actually want seen in the scrolling list box. Precede each line item with "[text]" (as you see above.) End each line item with "[/text]" (as you see above.) For example:



[text]Chicken Pox, Measles, Mumps etc.[/text]

[text]Chronic ear, nose or throat infections[/text]

[text]Chronic viral infections[/text]

[text]Chronic bacterial infections (Strep?)[/text]

[text]Chronic Skin or Fingernail afflictions[/text]

[text] * Unprovoked blisters on the (hands, feet, skin, where?)[/text]

[text] * Easily provoked calluses (hands, feet, skin, where?)[/text]



10. Now then, copy your prepared list items (as in #9 above), then go to the XML Source tab/page and paste them in replacement of your sample list items (as in #8 above).



Instead of:

[items]

[text]apples[/text]

[text]bananas[/text]

[text]pears[/text]

[/items]



You will have something like:

[items]

[text]Chicken Pox, Measles, Mumps etc.[/text]

[text]Chronic ear, nose or throat infections[/text]

[text]Chronic viral infections[/text]

[text]Chronic bacterial infections (Strep?)[/text]

[text]Chronic Skin or Fingernail afflictions[/text]

[text] * Unprovoked blisters on the (hands, feet, skin, where?)[/text]

[text] * Easily provoked calluses (hands, feet, skin, where?)[/text]

[/items]



11. After the above copy/paste routine, click the "Design View" tab to resume work. You will get a message that says "Do you want to save your changes to the XML Source? (and also a warning that some changes could cause the form to stop functioning correctly.) Click "Yes" (making sure that this is only a "test" file on how to do this, not your actual form. When you test with your form, you may want to do backups before working on your List Box.)



VOILA, your List Box is poplulated with the list items you wanted.



Tips:

1. I had a long list (100 items) in my scrolling list box, but only wanted the List Box to have about a 1 inch downward length (small footprint in the form). After having filled my list box, I wanted to click the "Preview PDF" tab to see if I could scroll through the items in the List Box. I could not, there was no scroll bar UNTIL I clicked into the list box. Thus, this made it such that I would have to inform users, "Please click within the following text box. When you do, a scroll bar will arrive at the right side of the box. This scroll bar will enable you to scroll through and view a list of items. (blah blah blah)" I put this explanation text in the caption of the List Box field.



Note: If a user tabs from one field to another, the scrolling List Box will have a scroll bar when they tab to that field. If they are just mouse scrolling through the form, they will need to know to click in the List Box to see that it is scrolling.



2. I really didn't want users selecting a choice in the List Box. In fact, I really didn't want that to be a "field" (just a scrolling list box of text)... I couldn't find a way around this (not with my set of knowledge about LC). For the List Box field, in the Object/Value tab, I selected "Read Only." That was a problem, because when users clicked within the List Box, no scroll bar arrived. I left the field as "User Entered - Optional" (Object palette/Value tab). I suppose that I could have used "Calculated - Users Can Override," but I didn't want users adding information in that field. I was too tired to explore further :)



Now then... Maybe the "pros" will tell us a better/faster, step by step way to do this. Until then, the above is how I did it. I hope it helps someone.



Tink