Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to set JSBarcode options #4351

Merged
merged 2 commits into from
Oct 20, 2017
Merged

Added ability to set JSBarcode options #4351

merged 2 commits into from
Oct 20, 2017

Conversation

GSLabIt
Copy link

@GSLabIt GSLabIt commented Oct 19, 2017

Field Options can be set as json style, like:

{ "format" : "EAN", "height" : 20, "width" : 1 }

examples:

schermata 2017-10-19 alle 19 41 45

schermata 2017-10-19 alle 19 42 25

For EAN type it will automatically recognize if EAN13 or EAN8 based on barcode value length:

schermata 2017-10-19 alle 20 01 29

schermata 2017-10-19 alle 20 03 21

if options is not a valid JSON, will fallback to standard options:

schermata 2017-10-19 alle 19 43 44

schermata 2017-10-19 alle 19 44 09

All available options for JSBarcode can be found at:

https://github.com/lindell/JsBarcode/wiki/Options

@rmehta rmehta merged commit 68efe91 into frappe:develop Oct 20, 2017
@albertusgeyser
Copy link

Good Day

Could someone guide how to use Barcode Type?

I get following:

Field Type cannot be "Barcode". It should be one of "Attach", "Attach Image", "Button", "Check", "Code", "Color", "Column Break", "Currency", "Data", "Date", "Datetime", "Dynamic Link", "Float", "Geolocation", "HTML", "Image", "Int", "Link", "Long Text", "Password", "Percent", "Read Only", "Section Break", "Select", "Small Text", "Table", "Text", "Text Editor", "Time", "Signature"

Hope anyone could help.

Thank You

@seehive
Copy link

seehive commented Apr 12, 2018

@albertusgeyser you need to check "Ignore XSS Filter", take a look at this comment

@bghayad
Copy link

bghayad commented Apr 4, 2019

Hello;
Can someone advice me how to set the value of the barcode field type through code from javascript?
I think there should be a method to set the value of the data-barcode-value attr from .js file. But how?

Regards
Bilal

@TurkerTunali
Copy link
Contributor

Hello; Can someone advice me how to set the value of the barcode field type through code from javascript? I think there should be a method to set the value of the data-barcode-value attr from .js file. But how?

Regards Bilal

Did you find a way to set Barcode field value?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants