Finally I fixed the bug. I replaced the control
{{grafica,,"}, ControlType-> InputField, ...}
by its Dynamic form
Column[{InputField[Dynamic[grafica], String,
FieldHint -> "ingrese una funciĆ³n polar. Ej: Cos[1.2t]^2",
ImageSize -> 250, BaseStyle -> 12]}]
and use ToExpression where I use "grafica". One can compare with the previous version in the question of this post.