restrict a field's content based on a selected taxonomy term I have a content type with a number field and a field for a taxonomy. I'd like that, when the user creates a node of this particular content type, the value that appears in the number field changes to a preset depending on the taxonomy term chosen.

For example, The taxonomy term is a restaurant and the number field is a price, if the user chooses an specific restaurant the price changes depending on the restaurant chosen.
option 1:
use a hook_form_FORM_ID_alter MYMODULE_form_node_form_alter(&amp;$form, $form_state) to add an ajax functionality on the taxonomy change event and populates the number field default value depending on the form_state taxonomy value.

option 2:
Add your own javascript with taxonomy terms mapped to number values and when the taxonomy term changes, change the number values to the mapped value. This is pretty much same as above without requiring ajax.