# Export code that contains InputField as CDF format?

**URL:** <https://community.wolfram.com/t/export-code-that-contains-inputfield-as-cdf-format/13015>\
**Category:** Questions\
**Tags:** mathematica, computable-document-format, import-and-export, interface-construction\
**Created:** [August 27, 2018, 10:56am UTC](https://community.wolfram.com/t/export-code-that-contains-inputfield-as-cdf-format/13015 "2018-08-27T10:56:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucieceplechova](https://avatars.discourse-cdn.com/v4/letter/l/b3f665/32.png) [@lucieceplechova](https://community.wolfram.com/u/lucieceplechova)\
**Post date:** [August 27, 2018, 10:56am UTC](https://community.wolfram.com/t/export-code-that-contains-inputfield-as-cdf-format/13015/1 "2018-08-27T10:56:18Z")

</div>

I have created a code in Wolfram Mathematica. I want it to be CDF file. I selected File-\> CDF Export → Standalone. I was told that the file doesn’t work. I think it is because of InputField. It has to work for all functions.

```
Clear[f, der1]
Manipulate[Grid
  [{{Column
     [{Row[{Framed[Style["Functions", Bold, White, 25], 
         Background -> Red, RoundingRadius -> 1
         ]}]}]},        
   {Column
     [{
      Row[{"Type the function: ", 
        InputField[Dynamic[f], Background -> LightYellow]}],    
      Row[{"Domain: ", 
        dom = Simplify[FunctionDomain[f, x, Reals]]}],     
      Row[{"Range: ", FunctionRange[f, x, y]}],
      Row[{"f[0] ", f /. x -> 0}],
      Row[{"f[x]=0 ", Simplify[x /. Solve[f == 0, x, Reals]]}],
      Row[{"First derivative ", der1 = Simplify[D[f, x]]}],  
      Row[{"Second derivative ", der2 = Simplify[D[f, x, x]]}],
      Row[{"First derivative = 0 ", 
        zeder = Solve[der1 == 0, x]}],      
      Row[{"Function is increasing: ", Reduce[der1 > 0, x]}],
      Row[{"Function is decreasing: ", Reduce[der1 < 0, x]}],
      Row[{"Points of discontinuity: ", 
        dis = Solve[Denominator[Together[f]] == 0, Reals]}],
      Row[{"First derivative - points of discontinuity: ", 
        noder = Solve[Denominator[Together[der1]] == 0, Reals]}],
      Row[{"Extrema: ", 
        extr = Union[
          Sort[Join[{axisxfrom}, {axisxto}, {zeder}, {noder}, \
{dis}]]]}], 
      Row[{"Maximal values ", 
        Maximize[{f, axisxfrom <= x <= axisxto}, x]}],
      Row[{"Minimal values: ", 
        Minimize[{f, axisxfrom <= x <= axisxto}, x]}], 
      Row[{"Function is convex ", Reduce[der2 > 0, x]}],
      Row[{"Function is concave ", Reduce[der2 < 0, x]}],
      Plot[f, {x, axisxfrom, axisxto}, 
       PlotRange -> {axisyfrom, axisyto}, Background -> LightGreen]
      }]}}],
 {axisxfrom, -5}, {axisxto, 5}, {axisyfrom, -2}, {axisyto, 2}]

```

---

<div class="post-metadata">

**Author:** ![gdelfino](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/gdelfino/32/41294_2.png) [@gdelfino](https://community.wolfram.com/u/gdelfino)\
**Post date:** [August 27, 2018, 1:04pm UTC](https://community.wolfram.com/t/export-code-that-contains-inputfield-as-cdf-format/13015/2 "2018-08-27T13:04:13Z")

</div>

Are you exporting to FreeCDF or EnterpriseCDF? Only the latter supports InputField.

---

<div class="post-metadata">

**Author:** ![lucieceplechova](https://avatars.discourse-cdn.com/v4/letter/l/b3f665/32.png) [@lucieceplechova](https://community.wolfram.com/u/lucieceplechova)\
**Post date:** [August 27, 2018, 1:08pm UTC](https://community.wolfram.com/t/export-code-that-contains-inputfield-as-cdf-format/13015/3 "2018-08-27T13:08:02Z")

</div>

I have to send it to someone and I don’t know what he has (FreeCDF or EnterpriseCDF). Is there some way to make it work even in Free CDF?

---

<div class="post-metadata">

**Author:** ![kubapod](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/kubapod/32/18662_2.png) [@kubapod](https://community.wolfram.com/u/kubapod)\
**Post date:** [August 28, 2018, 7:16am UTC](https://community.wolfram.com/t/export-code-that-contains-inputfield-as-cdf-format/13015/4 "2018-08-28T07:16:46Z")

</div>

Would be nice to mention that you already asked that question and that you received the answer explaining that if your teacher uses FreePlayer then you can only use numeric input fields and workaround the limitation with predefined set of functions.

[https://mathematica.stackexchange.com/q/180690/5478](https://mathematica.stackexchange.com/q/180690/5478)

The only way to make non numeric InputFields work in .cdf is to have an enterprise Mathematica license which allows enterprise deploymen. This most likely isn’t the case here.

Or to tell the teacher to open the .cdf from Mathematica rather than a FreePlayer.
