PEAR Packages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPEAR Packages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old August 22nd, 2006, 04:59 AM
marksu marksu is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 21 marksu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
quickForm - adding custom attributes to process function

My problem is to add attributes to the process_data function.
I also need more attributes than just the form attribute.

This seem to work
$form->process('process_data', false);

Now I like to also pass form attribute but cant get it to work
$form->process(array(&$form, 'process_data'), false);

// seems like is_callable does not accept the callback function?


function process_data($values) {
// proces data code here
}


// ***** THIS IS A READY MADE PEAR LIBRARY METHOD
// definition of the function is displayed at: http://pear.php.net/manual/en/packa...orm.process.php
function process($callback, $mergeFiles = true)
{
if (!is_callable($callback)) {
return PEAR::raiseError(null, QUICKFORM_INVALID_PROCESS, null, E_USER_WARNING, "Callback function does not exist in QuickForm::process()", 'HTML_QuickForm_Error', true);
}

$values = ($mergeFiles === true) ? HTML_QuickForm::arrayMerge($this->_submitValues, $this->_submitFiles) : $this->_submitValues;
echo "callback <BR>";

return call_user_func($callback, $values);
} // end func process[/url]

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPEAR Packages > quickForm - adding custom attributes to process function


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway