How to get the value of what is written in a form and not on the table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2023 07:03 AM
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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2023 03:26 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2023 07:49 AM
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