I have multiple CDF files that are linear algebra examples with dynamic entries via InputFields. An example of a single cell of a matrix is as follows:

InputField[Dynamic[a11, Function[If[NumberQ[#] && #=!=Null && Abs[#] < 50, a11 = #]]], FieldSize->3]

I use NumberQ instead of the Number to allow for input of fractions, such as 1/2, instead of having to put in a decimal equivalent.

Now when I would execute the notebook and test there, I had no issues. But after exporting as Web Embeddable, and then try inputting a fraction, I get the following:


I looked through the documentation on NotebookSecurity and a post on MSE that kind of explains this message. I'm just wondering if someone could explain how to get around this caution message so that the file is always trusted no matter what, such as with TrustByDefault. I have very narrow knowledge of Mathematica, so I'm not really sure how to apply what is given in the documentation.

Another part of this question I guess is if it is even a good idea to try to get around the caution? Are there any downsides to this?

  • 1
    $\begingroup$ If the file is by default in one of the Dynamic[Column[ ToFileName /@ CurrentValue[$FrontEnd, {"NotebookSecurityOptions", "TrustedPath"}]]] directories it will be trusted and you won't get the popup. If it is in one of the Dynamic[Column[ ToFileName /@ CurrentValue[$FrontEnd, {"NotebookSecurityOptions", "UntrustedPath"}]]] directories you will always get the popup. If it is in neither it relies on the value of TrustByDefault $\endgroup$
    – ktm
    Sep 14, 2016 at 15:18
  • $\begingroup$ If someone places the file in an untrusted directory it will give you the warning and I don't think you can get around that as the file-creator. $\endgroup$
    – ktm
    Sep 14, 2016 at 15:20
  • $\begingroup$ @user6014 If the directories are not listed like you said, is it possible to change the value of TrustByDefault? $\endgroup$
    – J_Nat
    Sep 14, 2016 at 15:27
  • $\begingroup$ it looks like it is possible to change the TrustByDefault value in CDF Player but not as easy as one would hope.. see community.wolfram.com/groups/-/m/t/616768?p_p_auth=MYuygPH9 $\endgroup$
    – ktm
    Sep 14, 2016 at 15:31
  • $\begingroup$ @user6014 I appreciate the link. I'll see what I can do, or just have my boss get over it ;) $\endgroup$
    – J_Nat
    Sep 14, 2016 at 15:34


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.