fill in form depending select box


Is it possible to fill in automaticly input fields on a form depinding what was filled in in selectbox

so if in selectbox I choose value 1
input field A becomes “apple”

and in selectbox bvalue 2
input field A becomes “orange”



It is solved.
in form I created a new ‘OnChange’ event.
When selectfield is changed, fill in other fields with setItemValue