Construct query option when a form's value is changed