How to create a dynamic qr-code

  • Profile Image
    polheyvaert
    Asked on September 27, 2019 at 02:52 AM

    Can you tell me how to create a jotform with a qr-code depending on multiple input-fields.

    A form with name, number of adults, number of children ...

    which generates a BCD qr-code for mobile payments.

    QR-code to generate :

    BCD 001 1 CST BICMyBic MyName MyIban eur{calculated price} {numberOfAdults} {numberOfChildren} {Name}

  • Profile Image
    EltonCris
    Answered on September 27, 2019 at 03:47 AM

    There's a workaround to achieve that. You can use the following code to generate a dynamic QR code. This HTML code will generate a QR code image that shows the user's data based on the defined text and field values. Make sure to use the correct field variables e.g. {Name} in the code from your form.

    <img src="https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=BCD 001 1 CST BICMyBic MyName MyIban eur{calculatedPrice} {numberOfAdults} {numberOfChildren} {Name}&choe=UTF-8" alt="Your unique QR code" width="150" height="150" />

    You can either add this code to your thank you page or in your email notification.

    To paste this code into your form's thank you page, here's how:

    Go to Settings > Thank you Page > click the source code icon <> then paste the code.

    On email, go to Settings > Emails > click the source code icon <> then paste the code anywhere you want the QR code image to appear.

  • Profile Image
    polheyvaert
    Answered on September 30, 2019 at 06:53 AM

    Thank you, this is very helpfull, but...

    The qr-code needs to have some new lines in it :

    BCD

    001

    1

    CST

    BICMyBic

    MyName

    MyIban

    eur{calculated price}

    {numberOfAdults}

    {numberOfChildren}

    {Name}



    How can this be done ?


    Thanks

  • Profile Image
    Richie_P
    Answered on September 30, 2019 at 08:03 AM

    I have checked the thread and it seems my colleague has shared the QR code that has all those fields.

    <img src="https://chart.googleapis.com/chart?chs=150x150&cht=qr&chl=BCD 001 1 CST BICMyBic MyName MyIban eur{calculatedPrice} {numberOfAdults} {numberOfChildren} {Name}&choe=UTF-8" alt="Your unique QR code" width="150" height="150" />

    To clarify, do you want to add these fields in your form?

    May we know the form in question?

    You may use the Field Unique name to populate the field in the QR e.g {name}.

    Guide:https://www.jotform.com/help/146-How-to-Find-Field-IDs-and-Names