4
$\begingroup$

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?

Thanks!

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!

$\endgroup$
4
  • 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$ Jan 15 '16 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
    Jan 15 '16 at 1:15
  • $\begingroup$ Leaving all boxes blank returns an empty list. What do you want instead? $\endgroup$ Jan 15 '16 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
    Jan 15 '16 at 1:36
5
$\begingroup$
CloudDeploy[
   FormFunction["x" ->
      <|"Interpreter" -> AnySubset[{"1", "2", "3"}], "Required" -> False|>,
      Identity], 
   FileNameJoin[{$CloudRootDirectory, "AnySubsetWithoutAnySelection"}]]

If you make no selection the cloud object returns:

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

$\endgroup$
0

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.