Text fields do not clear on ajax event

v9.4.008 Control Application
Field1 - is a select using select2.
Field2 - is a select based on the value selected in field1
Field3 - is a text field

Ajax field1_onchange event clears the value of Field2 (select) - but not Field3 (text)

I have tried setting the value of Field3 to {field3} = ‘’ OR {field3} = NULL and even {field3} = “something else”.

The value of field3 does not change when the ajax event is fired.

Same issue with a 0/1 switch field - field1_onchange event does not reset the value to its default (0)

Hi there,

I’m newbie but i have the same problem. However i found a solution about it;

Open your form, go to Javascript, select Form, select OnSubmit and click edit. Then you can use your code like this;

var field1_status = document.getElementById('id-opt-field1').checked;

if(field1_status ==true) {
    document.getElementById("id_sc_field_field-3").value = '';
}

You can find your field’s id in your form with your browser.