3

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.

Murta
  • 26,275
  • 6
  • 76
  • 166
  • 3
    Adding HoldForm suppresses the automatic submission but keeps the default input: CloudDeploy[FormPage[{"x" -> <|"Input" -> HoldForm["Apple"]|>}, Identity]] – rowsi Mar 31 '22 at 12:02

1 Answers1

1

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
  ]
Murta
  • 26,275
  • 6
  • 76
  • 166