Switch plain text according to radio button selection

Hi @Margo,
I have a small issue in plumsail with SharePoint radio button, I have a department column as below

so, I have given each department as ABCDE as above mentioned and load this to Plumsail as follows

In browser as follows,

I need to do a plain text change according to selecting radio button, as an example if radio button A selected, I need to display below text in a plain text box
4

If I select radio button B need to display B related text in the same text filed.

I have followed few articles but couldn’t fix the issue. If I could get the radio button label text, is it possible to do the switch based on radio button selection? I think this problem is for each radio button I don't have way to identify individually
I went this article as well but still facing issue. Can you please sent me a sample code to complete this function?
here is the form control properties

Dear @madhawa.rajapaksha,
You can add a function, which will check the value of the department, and then set the value of the text field, and this function should run when the department value changes, something like this should work:

fd.spRendered(function() {

    function departmentCheck() {
        if (fd.field('Department').value == 'A') {
            fd.field('Title').value = 'AAA';
        }
        else if (fd.field('Department').value == 'B') {
            fd.field('Title').value = 'BBB';
        }
        else if (fd.field('Department').value == 'C') {
            fd.field('Title').value = 'CCC';
        }
        else if (fd.field('Department').value == 'D') {
            fd.field('Title').value = 'DDD';
        }
    }

    // Calling departmentCheck when Department value changes
    fd.field('Department').$on('change',departmentCheck);

});
1 Like

Thank you very much @Nikita_Kurguzov This solution perfectly works for me