2
$\begingroup$

In this example I use a simple code like:

data = {1, 2, 3, 4}

CloudDeploy[
 FormPage["N" -> {1, 2, 3, 4},
  ListPlot[{data, data*#N}, Joined -> {True, False}] &]]

When I go to this CloudObject I see:

enter image description here

After pushing the "Submit"-button, I will see the result.

My question is: Before I submit, I would like to see the first option when I open the CloudObject like:

enter image description here

Anyone a suggestion how to do this?

$\endgroup$
3
$\begingroup$

The proper way is to use "Input" attribute of a form field:

data = {1, 2, 3, 4};
CloudDeploy[
  FormPage[
    "N" -> <|
      "Interpreter" -> {1, 2, 3, 4}
    , "Input" -> 3
    |>
  , ListPlot[{data, data*#N}, Joined -> {True, False}] &
  ]
, Permissions -> "Public"
]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.