What is the best way to keep symbols entered into InputField in the same order that you entered them so that they always display in that order?

What I am actually wanting to do is enter some text that contains things like subscripts and superscripts, integrals ... InputField[expr, String] is not the answer. On the other hand if I use

InputField[Dynamic[d], Hold[Expression]]

and then

d /. {Times -> List, Power -> Superscript} // ReleaseHold

I get a list that I can do things with:

For example I could wrap Row with a default spacer or TextCell and so on around it. But this seems quite an indirect way of doing things.

Edit

Adding HoldForm to the second argument to Dynamic doesn't appear to offer any advantage and as Andrew points out you can end up with nested HoldForm. So I think this is not a good solution -- maybe a backwards step actually.

For Andrew's solution, using Boxes in InputField doesn't, in itself, prevent ordering when you eventually release Hold (e.g. after using MakeExpression). i.e. I don't see how to avoid apply a hold of some type and removing Times to stop the ordering.

So using Boxes may in general provide more flexibility but I'm struggling to see how it adds anything for this specific problem.

Note, this leads to a new layer of HoldForm appearing after each edit. E.g. after a few edits you will have FullForm[d] => HoldForm[HoldForm[HoldForm[HoldForm[HoldForm[HoldForm[abc]]]]]].
–
Andrew MoylanFeb 18 '12 at 21:15

2

I do see it in Mathematica 7 with these steps: Type Dynamic[FullForm[d]]. Now enter something like asdf into the InputField. Press Enter to trigger the Dynamic update. Now click inside the InputField, say after the "s". Press backspace, enter a different letter, and press Enter again. Repeat. I get another layer of HoldForm each time.
–
Andrew MoylanFeb 18 '12 at 21:55

This doesn't appear to have any advantage over using plain vanilla Dynamic[d] as per what I have described in the question. See edit.
–
Mike HoneychurchFeb 18 '12 at 23:37

Mathematica is a registered trademark of Wolfram Research, Inc. While the mark is used herein with the limited permission of Wolfram Research, Stack Exchange and this site disclaim all affiliation therewith.