Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Generating a barcode with data from another field? (Acrobat XI/LiveCycle ES 8.2)

Avatar

Level 1

I know this has probably been answered somewhere else before but for the life of my I could not find it.  Please forgive this noob.

I have a form that I created in LiveCycle and I have one field that will need a seven digit number populated in it that the customer will have to pull off a bottle.  I want this seven digit number to turn into a barcode (128).

I am aware all you have to do is click on the barcode, type the numbers in and you get your barcode.  However I want the data to populate from another field on the form.

Capture.JPG

Any ideas?  I thank you in advance

Todd

10 Replies

Avatar

Level 5

Place code in the exit or change event of the 'Barcode from Bottle' field to set the rawValue of the barcode field.

Something like this:

Code128CBarCode1.rawValue = this.rawValue

Hope this helps

Mark

Avatar

Level 1

Mark

You mean paste in the XML code?

<field name="BarcodeInput" y="238.125mm" x="53.975mm" w="63.5mm" h="9mm">

            <ui>

               <textEdit hScrollPolicy="off">

                  <border hand="right">

                     <?templateDesigner StyleID aped2?>

                  </border>

                  <margin/>

                  <comb numberOfCells="7"/>

               </textEdit>

            </ui>

            <font typeface="Myriad Pro"/>

            <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>

            <para vAlign="middle"/>

            <caption reserve="32.81mm">

               <font typeface="Myriad Pro"/>

               <para vAlign="middle"/>

               <value>

                  <text>Barcode from Bottle</text>

               </value>

            </caption>

            <validate nullTest="error"/>

         </field>

         <field name="Button1" x="120.65mm" w="44.45mm" h="6mm" y="257.175mm">

            <ui>

               <button highlight="inverted"/>

            </ui>

            <font typeface="Myriad Pro"/>

            <caption>

               <value>

where?

Avatar

Level 5

You Will Need To Open The Script Editor Window In Designer,Then Select The 'exit' Event Of The Comb Field.

Avatar

Level 5

Set The Language In The Editor To javascript

Avatar

Level 5

Yes. if the names of your fields are correct -

Your screenshot does not show enough detail.

You should be able to test it in the Preview panel, by typing in the comb, and clicking out of the field.

THe barcode value should change to the value you entered.

Avatar

Level 1

again please forgive my ignorance, and I really appreciate your help.

Heres a bigger screenshotcode2.JPG

I tried it and it does not do anything.

Avatar

Level 5

Your source field is named Code128BarCode1, not Code128CBarCode1 as you have in the script.

Looks like a typo

Avatar

Level 1

It worked!  You are the man!!!  YOU ROCK!!!!

Thank you soo much!!!