a. My understanding is that the "barcode" that is generated below is based on the "Value" property of the SfQRCodeGenerator control. Is there a way to change the "Value" of the generated BarCode, after it has been generated?
https://blazor.syncfusion.com/documentation/barcode/qrcodegenerator
@using Syncfusion.Blazor.BarcodeGenerator <SfQRCodeGenerator Width="200px" Height="150px" Value="Syncfusion">SfQRCodeGenerator>
b. Also the documentation says the following: "OnValidationFailed event in the SfQRCodeGenerator is used to trigger when the input is an invalid string." Would you have an example of when the BarCode will not be generated for an invalid string?
|
public async Task OnValidationFailed(ValidationFailedEventArgs args)
{
if(val == 0)
{
await JsRuntime.InvokeVoidAsync("alert", args.Message);
val++;
}
} |
Thank you for your response Siva. I have checked the video and the barcode changes when the text is changed. My business requirement is to keep the barcode to be the same, when a url(based on which the barcode is generated) is changed. How can I accomplish this?
It will help to update the documentation for OnValidationFailed event based on your response above.
Hello Siva,
My requirement is that we need to generate the barcode based on a user provided url. After the barcode is generated, the user can change the url. However we do not want the barcode to be changed since it could have been distributed to lots of people and applications.
Eg: user generates the barcode based on a restaurant menu hosted in Amazon S3. He then distributes the barcode on his android and apple applications and also prints it out, to use in his restaurant.
He now wants to change the restaurant menu to a new amazon s3 url. How would scanning the existing barcode navigate to the restaurant menu in the new amazon s3 url?
Does this make sense? Please help.
I have a workaround for my issue. This ticket can be closed.
This is not a frontend issue, this is a backend issue. You should be using a WebServer and DB to create urls for your QR codes, that then map to the different S3 URLs in your DB.
I recommend a One to Many table with a QR code being a GUID to many S3 Menu links.
www.example.com/GUID redirects you to s3.amazon.menu.
Then simple create your QR code from the GUID link. Then when they visit the GUID link use javascript to redirect to s3.amazon.menu link, or display the different menus if you really want to.
Syncfusion is a UI library.
Thank you @MasonChanner, I understood the same and I asked the ticket to be closed.