Pregunta

I am using 12 hidden-fields on a form to store some values that I need to persist along my AJAX posts to the server.

Is this a bad practice? Should I use another technique like storing a JSON string inside just one hidden field? Or it's common scenario having all this hidden fields?

¿Fue útil?

Solución

Ultimately there is nothing wrong with having 12 hidden fields on a form. It's hard to give advice on what you should do because I do not know your circumstances.

My only piece of advice in these situations is to evaluate the situation and examine what your application is doing and if there is a better way.

Ask yourself if a form is doing too much at once. Can it be divided up? Is there a way to simplify the task at hand?

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top