aronallenson Posted June 8, 2011 Share Posted June 8, 2011 When creating a QR code for contacts, there is a property field called "TEL:" In the vCard spec there are some parameters that can go with the TEL property such as. TEL;WORK;VOICE:(111) 222-2222 TEL;HOME;VOICE:(222) 222-2222 TEL;CELL;VOICE:444-444-44444 TEL;WORK;FAX:(333) 333-3333 When I try to use these I get the following error. SyntaxError: missing : after property ID How can I specify the telephone number type in the QR code? Link to comment Share on other sites More sharing options...
Dan Korn Posted June 8, 2011 Share Posted June 8, 2011 Can you please post the JavaScript code that's generating the error? Here's an example of a rule which outputs a QR code with vCard contact info: http://forums.printable.com/showpost.php?p=7336&postcount=3 Also, the upcoming FusionPro 7.2 release will include a built-in template rule to encode a QR barcode with vCard contact info as a graphic. Link to comment Share on other sites More sharing options...
aronallenson Posted June 8, 2011 Author Share Posted June 8, 2011 Great, thanks. That was the answer. When using the parameters, I need to put them inside quotes. Link to comment Share on other sites More sharing options...
scubajbc Posted June 8, 2011 Share Posted June 8, 2011 Also, the upcoming FusionPro 7.2 release will include a built-in template rule to encode a QR barcode with vCard contact info as a graphic. Is there any timeframe for FusionPro 7.2 yet? Link to comment Share on other sites More sharing options...
Dan Korn Posted June 8, 2011 Share Posted June 8, 2011 Is there any timeframe for FusionPro 7.2 yet? It's in final QA testing right now. I would expect it to be released within the week. Link to comment Share on other sites More sharing options...
Dan Korn Posted June 8, 2011 Share Posted June 8, 2011 Great, thanks. That was the answer. When using the parameters, I need to put them inside quotes. Right, in code like this: var info = { // ADD OR REMOVE FIELDS HERE TO MATCH YOUR DATA N: FieldOrRule("QR Contact Name"), "TEL;WORK;VOICE": FieldOrRule("QR Phone").replace(/\D/g,''), "TEL;WORK;FAX": FieldOrRule("QR Fax").replace(/\D/g,''), EMAIL: FieldOrRule("QR Email"), URL: FieldOrRule("www"), ORG: FieldOrRule("Organization"), TITLE: FieldOrRule("title1"), }It's actually declaring a JavaScript object literal named "info", with a set of properties, one per line, each of which has a name to the left of the colon and a value to the right of the colon. The name of a property can be just about anything, but if it's not a valid identifier, it has to be enclosed in quotes as a string literal. You could put every property name inside quotes in the object literal and that would work fine too. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.