I was wondering if it is possible to add a title to
InputField
As far as I know, you can only add a FieldHint, this one will disappear however as soon as the user has entered input. But I still want the user to know what his input corresponds to. So I was wondering if there is some sort of a workaround for that.
Edit: Tried to implement it but it shows up with {}, which is not what I want, could it be that the problem is that I use Column, instead of Grid? Documentation would suggest otherwise...
Panel[Column[{{"Purchase Price",
InputField[Dynamic[purchaseprice], Number,
FieldHint -> "Purchase Price",
ImageMargins -> 10]}, {"Equity Capital",
InputField[Dynamic[EK], Number, FieldHint -> "Equity capital",
ImageMargins -> 10]}, {"Mortgage rate in %",
InputField[Dynamic[mortgagerate], Number,
FieldHint -> "Mortgage Rate in %",
ImageMargins -> 10]}, {"Supplementary Costs per annum",
InputField[Dynamic[supplymentary], Number,
FieldHint -> "Supplementary costs per annum",
ImageMargins -> 10]}, {"Payback Period",
InputField[Dynamic[paybackperiod], Number,
FieldHint -> "Payback Period",
ImageMargins -> 10]}, {"Gross Income per annum",
InputField[Dynamic[grossincome], Number,
FieldHint -> "Gross Income per annum",
ImageMargins -> 10]}, {"Calculatory mortgage rate",
InputField[Dynamic[calcrate], Number,
FieldHint -> "Calculatory mortgage rate", ImageMargins -> 10]},
Dynamic@If[
grossincome*0.33 > (purchaseprice - EK)*mortgagerate/100 +
supplymentary +
Max[{((purchaseprice - EK) - 0.66*purchaseprice)/paybackperiod,
0}], TextCell[
"Congratulation you are qualified for a mortgage", "Subtitle"],
Dynamic[Text["You only have "] Text[
Round[((purchaseprice - EK)*mortgagerate/100 + supplymentary +
Max[{((purchaseprice - EK) - 0.66*purchaseprice)/
paybackperiod, 0}])/purchaseprice*100] Text[
"% instead of 33%"]]]]},
Background ->
Dynamic@If[
grossincome*0.33 > (purchaseprice - EK)*mortgagerate/100 +
supplymentary +
Max[{((purchaseprice - EK) - 0.66*purchaseprice)/paybackperiod,
0}], Green, Red]]]

Columnlike you did now, then each{"label", inputfield}needs to be wrapped in aRow. (2) You useColumnlike you did, but you use aGridfor your inputs likeGrid[{{"label 1", input1}, {"label 2", input2},..}]. – halirutan Jun 26 '18 at 15:21{}in your code. Try removing the curly brackets around each row. You might want to then adjust the text and alignment, but that works on my end. – kickert Jun 26 '18 at 15:22