formatting an InputField with Dynamic [closed]

I have the following code

Style["("
InputField[Dynamic[t], Number, ImageSize -> 30]
")="
PDF[NormalDistribution[μ, σ], t],
16]


which doesn't result in

"f(inputfield) = result of PDF calculations based on input"

Any ideas?

-

closed as off-topic by Kuba, Sjoerd C. de Vries, Nasser, m_goldberg, bobthechemistJan 25 '14 at 2:34

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Sjoerd C. de Vries, Nasser, m_goldberg, bobthechemist
If this question can be reworded to fit the rules in the help center, please edit the question.

No code formating after 7 questions? Does'nt look like you've put much effort into this Q... –  Ajasja Jan 24 '14 at 20:22
?? I've read and tried for the past two hours - wondering if I'm missing something easy or obvious - or trying to do something the wrong way. –  Fred Schenkelberg Jan 24 '14 at 20:40
No, no, I'm talkinig about the time you needed to write the Q. It's very polite to at least format the code you present using either 4 spaces or . In the other questions somebody else has taken the time to do that for you. Good formating will increase the chance of a good A. –  Ajasja Jan 24 '14 at 21:24
Ajasja is talking about post formatting. About the question, I think you should keep in mind one commonly quoted phrase: everything is an expression. What your code does is multiplying the parts in Styles first argument. Take a look ar Row, Grid and related tutorials, e.g: tutorial/FormattedOutput. –  Kuba Jan 24 '14 at 21:25

You cannot simply put random expression or strings separated by a space in a sequence, because Mathematica interprets this as multiplication:

"oh" "my" "god"
(* "god" "my" "oh" *)


What you probably want is

Style[Row[{"f(", InputField[Dynamic[t], Number, ImageSize -> 30],
")=", Dynamic@PDF[NormalDistribution[\[Mu], \[Sigma]], t]}], 16]


which uses Row`.

-