How to get the value of what is written in a form and not on the table

F_bio Santos
Kilo Sage

Hi everyone, Im using the "form" widget, where I have a "message" field and a "resolve" button.

What is happening:

When I click resolve it looks at the value of the "message" field in the table and it's not empty, the state goes to "Closed Completed".

What Im trying to do:

When I click resolve it looks at what is written in the "message" field and not on the table, and if it is empty we get an infoMessage "Message is empty" and if it not empty the state moves to "Closed Completed".


The problem is that I dont know the code to get what's written on the field instead of what is in the table ...

Can anyone help with this ?

Image of the portal:

F_bioSantos_0-1698242604346.png

 



6 REPLIES 6

Anand Kumar P
Giga Patron
Giga Patron

Hi @F_bio Santos ,

function onSubmit() {
    var messget = g_form.getValue('field_backendname_message');
    if (!messget || messget.trim() === '') {
        g_form.addInfoMessage('message field is empty');
        return false;
    }
    return true;
}

Thanks,

Anand

Hi @Anand Kumar P I tried this, but It has the same result, when I click the "Resolve" button it opens the spModal and lets me close the request