Discussions

Expand all | Collapse all

Exact Forms: Quotation Marks Not Working

  • 1.  Exact Forms: Quotation Marks Not Working

    Posted 08-26-2020 16:05
    Edited by Benjamin Golden 08-26-2020 16:09
    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
    ------------------------------


  • 2.  RE: Exact Forms: Quotation Marks Not Working

    Posted 08-26-2020 18:01
    I should add: this happens regardless of whether the text in question is Javascript or plain text. For example, "Hello" becomes ?Hello?

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



  • 3.  RE: Exact Forms: Quotation Marks Not Working

    Posted 08-27-2020 20:18
    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
    ------------------------------



  • 4.  RE: Exact Forms: Quotation Marks Not Working

    Posted 08-28-2020 11:42
    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
    ------------------------------



  • 5.  RE: Exact Forms: Quotation Marks Not Working

    Posted 08-28-2020 14:34
    Update: Turns out the issue is inherent to the Microsoft Word exact forms. I revised the form in HTML and like magic everything worked again. Why that wasn't my first thought, I have no clue. But anyway, lesson learned: only use the Word macro for formatting.

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