3
$\begingroup$

If I deploy this code:

CloudDeploy[FormPage[{"x" -> <|"Input" -> "Apple"|>}, Identity]]

When I execute the URL the form is automaticaly submitted as in the image below

form image

To prevend auto submitting, as mentioned in this post, I tried:

CloudDeploy[FormPage[{"x" -> <|"Input" -> "Apple", "AutoSubmitting" -> False|>}, Identity]]

...but without success. Any clue?

The real case is a form with some default values that can be changed before the submition.

$\endgroup$
1
  • 3
    $\begingroup$ Adding HoldForm suppresses the automatic submission but keeps the default input: CloudDeploy[FormPage[{"x" -> <|"Input" -> HoldForm["Apple"]|>}, Identity]] $\endgroup$
    – rowsi
    Mar 31, 2022 at 12:02

1 Answer 1

1
$\begingroup$

Using @rowsi's hint, in my real world case "Apple" is a variable, so we need Evaluate to solve It:

myVar = "Apple";
CloudDeploy@FormPage[
      {"x" -> <|"Input" -> HoldForm@Evaluate[myVar]|>}
      , Identity
  ]
$\endgroup$

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.

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