# Is it possible to use FormObjects and FormFunction in a stand-alone notebook?

I have been looking at the FormObject and FormFunction. Can FormObject and FormFunction be used without CloudDeploy?

Are there any examples of using FormObject or FormFunction that show how a submit would be done for a given FormObject?

Should submit be implemented as a Button control?

• I.m.o. FormFunction is designed for cloud deployment. Even form[] is meant only for a quick check/preview. To have full control just use DialogInput/Input and friends. – Kuba Feb 24 '17 at 8:58

This is a form definition:

ff = FormFunction[FormObject[<|"x" -> "Number"|>], #x^2 &]


Now watch the [] after the ff, this launches the form and waits for input and shows a submit button

ff[]


If you want put a value in the form without showing a submit button:

ff["x" -> 9]


• pvanbijen - Thank you very much! This is very useful ! – Doug Kimzey May 6 '15 at 10:47

I have found that Wolfram Language Documentation has only one example on how to read data from inside a notebook using a FormFunction and it is not easy for a newcomer to notice or understand how input is read and what is the form of output.

For the example above, it is not necessary to use FormObject as the first argument of FormFunction and you don't even have to pass a Function as the second argument. A single argument with a list of rules representing fields and types is sufficient. Therefore you can :

1. Construct the form

twofields = FormFunction[{"x" -> "Number"},{"y"->"String"}];

2. Complete the form

twofields[]


    Output= <|"x" -> 3, "y" -> "three"|>

• Am I really the only one who has print to console settings and form[] displays in MassagesNotebook? – Kuba Feb 24 '17 at 8:57
• Can anybody tell me how to tweak the appearance of field boxes, e.g. width and height, font size, that will be great. – Athanassios Feb 24 '17 at 8:57