This topic is locked
[SOLVED]

Add Page getting field value

10/27/2021 3:39:16 PM
PHPRunner General questions
B
b.emanuele author

Hi, I added a button in a cell just above the fields in the Add Page, I want to retrieve the content of a specific field before writing it to te database and use this value in the Client Before event.

I tried this but it raise an error when in the browser:

function OnBefore(pageObj,params,ajax,ctrl,row)
{
var txt = row.getFieldText("field_in_the_add_page");
ajax.setMessage(txt);
}

Thank you

B
b.emanuele author 10/27/2021

The error says:

Uncaught TypeError: Cannot read properties of null (reading 'getFieldText')

admin 10/27/2021

You are using a wrong function. See this article.

B
b.emanuele author 10/29/2021

Thank you, now it's fixed.