This is a two part problem:
I have a form that accepts both numeric and text inputs, then runs a function using a "process" Button. The issue I'm having is users that forget to fill out all of the fields and the function will not run. What I would like to do is to add some form of message dialog to the user that explains the problem, and preventing the function from running.
Two of these InputFields feed a function that displays results in the notebook dynamically. Prior to having values in the InputFields for this dynamic function the code is visible in the section of the Grid the results will be displayed. How can I hide the code and just display the results after the InputFields have been populated?
Here is an example of the InputField code I'm working on:
Column[
{Grid[{{Style["code test", FontFamily -> "Arial", "Helvetica"]},
{Grid[{{Style["input 2 #", FontFamily -> "Arial", "Helvetica"],
InputField[
Dynamic[f1, If[# === Null, f1 = 0, f1 = Round[#, 00.001]] &],
Number, FieldSize -> {4, 1}],
Style["input 3 #", FontFamily -> "Arial", "Helvetica"],
InputField[
Dynamic[f2, If[# === Null, f2 = 0, f2 = Round[#, 00.001]] &],
Number, FieldSize -> {4, 1}],
Dynamic[data1 = Round[f2, .01] , CachedValue :> 0,
ContinuousAction -> False]}}, Frame -> None, ItemSize -> 10]},
{Grid[{{Style["input 4 #", FontFamily -> "Arial", "Helvetica"],
InputField[
Dynamic[f3,
If[# === Null, f3 = Round[#, 0.01], f3 = 00.001] &], Number,
FieldSize -> {4, 1}],
Style["input 4 #", FontFamily -> "Arial", "Helvetica"],
InputField[
Dynamic[f4,
If[# === Null, f4 = Round[#, 0.01], f4 = 00.001] &], Number,
FieldSize -> {4, 1}],
Dynamic[data2 = Round[f4, .01] , CachedValue :> 0,
ContinuousAction -> False]}}, Frame -> None,
ItemSize -> 10]}}, Frame -> None],
Button[Style["Process"], SelectionMove[yes =
Mean[f2, f3], Method -> "Queued", All, ButtonCell]]}]
Print["yes", yes];
Code updated to provide a better example of the problem. Thanks for your help!