Message Boards Message Boards

0
|
9152 Views
|
2 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Disable Autosubmitting on a FormPage?

I've created a FormPage with four input fields for deployment with "clouddeploy". Even though I've not explicitly set the "Autosubmitting" property, the form still submits when moving between these four fields, and as a result generates an error message "This field is required." for each of the remaining empty fields.

How do I turn off "Autosubmitting" so that the user filling out the form MUST click the Submit button in order for the form to be processed?

CloudDeploy[FormPage[
  {
   "first" -> Restricted["Integer", {1, 9}],
   "second" -> Restricted["Integer", {1, 9}],
   "third" -> Restricted["Integer", {1, 9}],
   "fourth" -> Restricted["Integer", {1, 9}]
   },
  Total[{#first, #second, #third, #fourth}]&]

Related, I'm trying to format output of a function for CloudDeploy using Grid, but the Grid settings are not honored once the form is published. It works fine in the Notebook interface. The same goes for functions like ToExpression combined with TraditionalForm and HoldForm. It works fine in the Notebook interface, but breaks once published to the Wolfram Cloud using the CloudDeploy function.

POSTED BY: Christopher Fox
2 Replies

Turn off "AutoSubmitting":

{"first" -> <|"Interpreter" -> Restricted["Integer", {1, 9}], "AutoSubmitting" -> False|>, ... }

See FormObject documentation and also this Wolfram Community answer.

Thank you! That worked. Had I known AutoSubmitting was default true, I'd have thought to try this first.

Not only did you help solve my problem, you also helped me better understand the full Association spec for FormObjects.

Much appreciated!

POSTED BY: Christopher Fox
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract