Did you trying something like this in a JS script?
Assuming you wants to edit the service
text field.
jQuery(document).ready(() => {
const textfield_type = document.querySelector('input[name="type"]');
const textfield_service = document.querySelector('input[name="service"]');
const updateField = () => {
if (textfield_type.getAttribute('value') === 'Houses' && textfield_service.getAttribute('value') === '2') {
textfield_service.setAttribute('value', 'NOT AVAILABLE');
}
// ... other rules
}
// Launch the event only if the two fields exists
if (textfield_type !== null && textfield_service !== null) {
textfield_service.addEventListener('focusout', () => updateField());
}
});