Dear all
I have a simple form with the fields:
phone_type_idphone_type (Select)
country_idcount (Select)
phone_area_co (text)
phonenumber (text)
When the user select a value in phone_type_idphone_type (select) the javascript should change the values of the other three fields.
So i tried with the help of ChatGPT4 to get it running. That was the output based on the facts that we gathered... but non of the scripts suggestions worked
How can i change the other fields on this form based on the value that is selected in phone_type_idphone_type?
Thanks
-----------------------------
You are using DaDaBIK version 11.9-Elba platinum, installed on 18.04.2023 (installation code: 1823863317aa3d0534), the latest version of DaDaBIK is 11.9-Elba released on 23.03.2023
You are running the latest release of DaDaBIK
In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enterprise to Platinum) please contact us.
PHP Version: 7.4.33
mysql version: 5.7.42
Web server: Apache
Client: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0
----------------------------------------
I have a simple form with the fields:
phone_type_idphone_type (Select)
country_idcount (Select)
phone_area_co (text)
phonenumber (text)
When the user select a value in phone_type_idphone_type (select) the javascript should change the values of the other three fields.
So i tried with the help of ChatGPT4 to get it running. That was the output based on the facts that we gathered... but non of the scripts suggestions worked
JavaScript:
function dadabik_phone(field) {
if (field.value == '2') {
document.getElementById('country_idcountry').getElementsByTagName('input')[0].value = '1';
document.getElementById('phone_area_code').getElementsByTagName('input')[0].value = '22';
document.getElementById('phonenumber').getElementsByTagName('input')[0].value = '123';
}
}
How can i change the other fields on this form based on the value that is selected in phone_type_idphone_type?
Thanks
-----------------------------
Your current DaDaBIK version
You are using DaDaBIK version 11.9-Elba platinum, installed on 18.04.2023 (installation code: 1823863317aa3d0534), the latest version of DaDaBIK is 11.9-Elba released on 23.03.2023
You are running the latest release of DaDaBIK
In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enterprise to Platinum) please contact us.
System info
PHP Version: 7.4.33
mysql version: 5.7.42
Web server: Apache
Client: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0
----------------------------------------