How to create a dynamic qr-code

  • polheyvaert
    Asked on September 27, 2019 at 2: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}

  • Elton Support Team Lead
    Replied on September 27, 2019 at 3: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 code0" 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.

    How to create a dynamic qr code Image 1 Screenshot 31

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

    How to create a dynamic qr code Image 2 Screenshot 42

  • polheyvaert
    Replied on September 30, 2019 at 6: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

  • Richie JotForm Support
    Replied on September 30, 2019 at 8: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 code0" 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}.

    How to create a dynamic qr code Image 1 Screenshot 21

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