# Form with FormFunction problem

I've this form:

f[a_, b_] := a + b;
form = FormFunction[FormObject[<|"a" -> "Number", "b" -> "Number"|>], f[#a, #b] &];
form[]


How I can automatically bring up the form after the output display? (If I insert 3 and 2 and I click submit, it return 5. After 5, I'd like to see the form again.) And can I remove "Cancel" or assign it an action like "Submit" button? Thanks

• Broadly, what are you trying to accomplish? Is it necessary that FormFunction be used? – bbgodfrey Jun 26 '16 at 4:38

The form[] can be returned as the output.

f[a_, b_] := a + b;

form = FormFunction[
FormObject[<|"a" -> "Number", "b" -> "Number"|>], (Print@f[#a, #b]; form[]) &];

form[]


I solved with

f[a_, b_] := a + b;
FormPage[{"a" -> "Number", "b" -> "Number"}, f[#a, #b] &]


The result is show below the form.

• I've an other problem with this type of form but with an other example. I've a function f with different Print. The output is show below the form but Print's output are shown in an other window (a notebook called "Message"). How can I disable this notebook to show its contents directly below the result of the function? – RossFe Jun 26 '16 at 13:06