Forum Discussion

BenjaminGolden's avatar
BenjaminGolden
Qrew Cadet
4 years ago

Exact Forms: Quotation Marks Not Working

Hi,

To make a long story short, I've been trying to make a specific exact form, but have come to realize that any single or double quotes in the body of the form appear as '?' in browser, which of course breaks any Javascript that might make use of it. Is there an alternate character I can use to make my Javascript work? I tried it out on both Chrome and Firefox

For example, I might type out

~=if(f[23].charAt(0) <= 1){“Safety”;}~

and Chrome outputs
Sorry, 'if(f[23].charAt(0) <= 1){?Safety?;} contains a JavaScript error: Unexpected token '?'
------------------------------
Benjamin Golden
------------------------------

4 Replies

  • I should add: this happens regardless of whether the text in question is Javascript or plain text. For example, "Hello" becomes ?Hello?

    ------------------------------
    Benjamin Golden
    ------------------------------
    • KeithJusas's avatar
      KeithJusas
      Qrew Captain
      instead of putting logic like that in the ef template why not just create a formula field on the table itself and then use the formula field in the template?

      ------------------------------
      Keith Jusas
      CEO
      Juiced Technologies, Inc.
      Ronkonkoma NY
      6316175060
      ------------------------------
      • BenjaminGolden's avatar
        BenjaminGolden
        Qrew Cadet
        That's definitely an option I considered, however I'm not the only person who works on the app in question and I'd like to add as few fields as possible. Having conditional logic in the EF itself is my plan A, and I know it's possible with vanilla QB since I already have some working. But my main concern is the fact that quotation marks just don't get processed correctly regardless of anything, so it'd be nice to know how to fix this so that plain text documents with quotation marks display correctly.

        ------------------------------
        Benjamin Golden
        ------------------------------