I'm trying to make a quick form that has an optional input. This is what I have now:

CloudDeploy[FormFunction[{"d1frees", "Day 1 Frees"} -> AnySubset[{1, 2, 3, 4, 5, 6, 7, 8}]],Permissions->"Public"]

The problem that I have is that I can't leave the subset blank. Is there any way to do this or am I required to fill in all fields?


P.S. I have tried to look for this on both stack exchange and in the documentation, but I'm not the best at finding things, so if I missed something then just redirect me to the right answer!

  • 1
    $\begingroup$ Your FormFunction generates 8 checkboxes, any assortment of which you can select. Is this what you mean by optional input? If not, then exactly what type of controls or input fields are you looking for? $\endgroup$ Commented Jan 15, 2016 at 0:11
  • $\begingroup$ Sorry for not stating my question well. What I meant was that I want to be able to leave all of the boxes blank. $\endgroup$
    – nbingo
    Commented Jan 15, 2016 at 1:15
  • $\begingroup$ Leaving all boxes blank returns an empty list. What do you want instead? $\endgroup$ Commented Jan 15, 2016 at 1:34
  • $\begingroup$ Wait, it did let you do that? When I try it tells me that I have to fill it in... Is there something that I'm doing wrong. Also, thanks for helping! :-) $\endgroup$
    – nbingo
    Commented Jan 15, 2016 at 1:36

1 Answer 1

   FormFunction["x" ->
      <|"Interpreter" -> AnySubset[{"1", "2", "3"}], "Required" -> False|>,
   FileNameJoin[{$CloudRootDirectory, "AnySubsetWithoutAnySelection"}]]

If you make no selection the cloud object returns:

<|"x" -> Missing["NoInput"]|>


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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