Hi Randy,
you gave not much info to help you.
I can only guess: the user is displayed some input field, which you want
to validate in the post_process function. The function of post_process
is to take the result from $value_in, validate it and maybe modify it
and then return it in $value.
So possible code might look like:
function
pre_process($name,&$value,&$cell,&$readonlys,&$extension_data,&$tmpl)
{
// store correct result of captcha for post_process validation
$extension_data = ‘123’;
// further code
}
function
post_process($name,&$value,&$extension_data,&$loop,&$tmpl,$value_in)
{
if ($value_in != $extension_data)
{
etemplate::set_validation_error($name,lang("’%1’ is not valid --> go
away !!!");
return false;
}
$value = $value_in; // or true
return true;
}
randy schrieb:
Hello Ralf & Nathan,
I am working on a captcha widget which is nearly finished. I am trying to
validate the code in the post process function of my widget class and all
post_process function parameters are empty. As a result I cannot do my
check to see if the code is correct and send the appropriate validation
errors.
post_process($name,&$value,&$extension_data,&$loop,&$tmpl,$value_in)
Any thoughts on why all the parameters would be empty?
–
Ralf Becker
Director Software Development
Stylite GmbH
[open style of IT]
Morschheimer Strasse 15
67292 Kirchheimbolanden
fon +49 (0) 6352 70629-0
fax +49 (0) 6352 70629-30
mailto: rb@stylite.de
www.stylite.de
www.egroupware.org
Geschäftsführer Andre Keller, Gudrun Müller,
Nigel Vickers und Ralf Becker
Registergericht Kaiserslautern HRB 30575
Umsatzsteuer-Id / VAT-Id: DE214280951
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
eGroupWare-developers mailing list
eGroupWare-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-developers