1
Good morning!
I am preparing a form, and this form contains a select field. Depending on the select field that the person chooses, new fields must be shown, exclusive to each option.
The question is: I must leave these fields previously loaded and leave them hidden (and obviously show as the option was selected), or I must make a new request with ajax and enter them the current page?
Or maybe they have a better alternative :)
Note that no database query will be made when choosing an option. I leave a picture below to illustrate better:
Thank you!
Felipe, please post your code? It can be an example of one that will be visible and another that should be visible after selecting a certain option
– Jakson Fischer
This depends on your code, how it is loaded, whether it takes ajax calls...
– Ricardo Pontual
I find it much better to keep it hidden than to make extra requests to the server. But I think the question is more based on opinion.
– Sam