This topic is locked
[SOLVED]

 Custom Field creation

1/7/2011 6:39:03 AM
PHPRunner General questions
T
text author

Hi
I just wanted to check my understanding of how you create a custom field in an edit page:
I have created a custom input field on my edit page:
<INPUT id=tester name=tester>
and placed the following code in the edit page JavaScript OnloadEvent:
this.on('beforeSave', function(formObj, fieldControlsArr, pageObj){

var val = $("#tester").val();

formObj.baseParams['tester1'] = val;

});
Which should then enable me to access the field value if I place:
$_SESSION["tester"]= $_REQUEST["tester"];
in either the "before record updated" or "after record updated" event.
I just do not seem to be able to store the value (using phpr5.3 build 7113) and don't know java so wouldn't be able to spot if there was a problem with the java code.
Thanks
Richard

Sergey Kornilov admin 1/7/2011

Richard,
this is a mistype in the manual. We'll fix this.
Correct assignment is

$_SESSION["tester"]= $_REQUEST["tester1"];
T
text author 1/8/2011

Thanks Sergey I thought I was going nuts!



Richard,
this is a mistype in the manual. We'll fix this.
Correct assignment is

$_SESSION["tester"]= $_REQUEST["tester1"];