QR Element

Categories

Component ID

2288505

Component name

QR Element

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

A render array element that displays a QR code from a given value.

This may be the simplest possible QR code generator module. The image is built in the browser by this jquery plugin: https://github.com/jeromeetienne/jquery-qrcode

Display a QR code from your render array simple as this:

    'my_element' => array(
      '#type' => 'qrcode',
      '#value' => 'value of the code'
    )

Optionally, specify the size of the QR code like this:

    'my_element' => array(
      '#type' => 'qrcode',
      '#value' => 'value of the code',
      '#width' => 100,
      '#height' => 100
    )