The ADFGVX cipher was a German field cipher used during World War I. The cipher gets its name by the six possible letters used: A, D, F, G, V, and X. These letters were chosen deliberately because they are very different from each other when transmitted via Morse Code, which reduces operator error. The cipher itself is actually an extension of the earlier ADFGX which was invented by Colonel Fritz Nebel, introduced in March 1918. It's security originates from the fractionation creating by combinding a modified Polybius square with a single columnar transposition. For more information, see the Wikipedia Article.
Here is an electronic implementation is a computerized version of the historic cipher. It has been increased in security by an addition of "Z" to the alphabet. This allows for a slightly extended alphabet to allow modern punctuation, and somewhat increased security. and added a "Z", but you can change the base operations of the cipher anyway you want. You can modify the alphabet with the Base Alphabet Key, but it is important to keep the alphabet a product of a perfect square (25, 36, 49...). Also, the alphabet key is a permutation of the alphabet that is used as the prearranged key to secure the cipher. The Transposition Key is the second key, and controls the second-stage encryption, the permutation of all the letters, creating the fractionation effect. Lastly, the square labels are what the Polybius Square columns and rows are labeled with. It is typically "ADFGVX", but it can be whatever you want. If you expand the alphabet, you will need a bigger square label. Note that it is not ideal to use "j" in your square labels or you will decrypt the null characters. This makes the cipher complicated and secure by World War II standards, but note it is not secure at all by modern standards, and do not use it to encrypt private data! Only use it for fun! If you want true security, go look up block ciphers on the internet. Also, if you are interested in creating secure hand ciphers, you can combind this cipher with other ciphers.
Note: The base ADFGVX script is a modified version of John's script from John's JavaScript Secret-Code Systems & Ciphers.