You are right. When I run in a new .nb file it was fine. But I don't understand why this is not working in the following format.
Manipulate[
DynamicModule[{u =
z Sin[\[Pi] x] + z Cos[\[Pi] y] + y^6 Cos[2 \[Pi] y],
vars = {x, y, z}, varlims = {{-3, 3}, {-3, 3}, {5, 6}},
poi = {x, y}, svars = {z}},
Column[{Style["Ploter", "Function"] ,
Row[{"Function ", InputField[Dynamic[u]]}, Spacer[20]],
Row[{"Variables ", InputField[Dynamic[vars]]}],
Row[{"Variable limits ", InputField[Dynamic[varlims]]}],
Row[{"Plane of interest", InputField[Dynamic[poi]]}],
Row[{"Variying variables", InputField[Dynamic[svars]]}],
Dynamic[Plotslices[u, vars, varlims, poi, svars]]}]], {{z, 16,
"z"}, 0, 1, 0.0001}, Initialization :> (
Plotslices[u_, vars_, varlims_, poi_, svars_] :=
Module[{(*v1,v2,lv1, lv2,rv1,rv2,*)v1p, v2p},
u /. poi[[1]] -> v1;
u /. poi[[2]] -> v2;
Print[u];
v1p = poi[[1]];
v2p = poi[[2]];
posv1 = Position[vars, v1p][[1]];
posv2 = Position[vars, v2p][[1]];
lv1 = varlims[[posv1, 1]][[1]]; Print[lv1];
lv2 = varlims[[posv2, 1]][[1]]; Print[lv2];
rv1 = varlims[[posv1, 2]][[1]]; Print[rv1];
rv2 = varlims[[posv2, 2]][[1]]; Print[rv2];
psl =
Plot3D[u, {v1, lv1, rv1}, {v2, lv2, rv2},
PerformanceGoal -> "Quality", Mesh -> None(*,
ColorFunction\[Rule]Function[{x,y,z},Hue[z]]*),
ImageSize -> Medium];
Return[psl];];
)
]