The control InputField has the option FieldCompletionFunction for showing optional autocompletions (updates a dropdown as you type).

Is this possible with cloud-deployed FormFunction forms?

What I've tried:

So doing somthing without FormFunction like this didn't work:

 DynamicModule[{a = "j", q = "", 
   authors = {"Jane Austen", "Jean Rousseau", "Jewel"}, 
   bin = CreateDatabin["quotes"]},
        InputField[Dynamic[a], String, 
         FieldCompletionFunction -> (Flatten[
             StringCases[authors, ___ ~~ # ~~ ___, 
              IgnoreCase -> True]] &)]},
        InputField[Dynamic[q], String, ImageSize -> {400, 100}]}}, 
      Frame -> None], 
     Button["Add Quote", 
      Echo@ DatabinAdd[bin, {"Author" -> a, "Text" -> q}]]}
    ]]], Permissions -> "Public"]

enter image description here

This fails because it seems FieldCompletionFunction don't work within CloudDeploy:

CloudDeploy @ InputField[1, FieldCompletionFunction -> ({"fish", "fowl"} &)]
  • $\begingroup$ Just FYI the databin complains about something in the clouddeploy page $\endgroup$ – user5601 Apr 21 '20 at 4:31
  • $\begingroup$ The example isn't functional, I'm just demoing the issue with FieldCompletionFunction... $\endgroup$ – M.R. Apr 21 '20 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.