Board index   FAQ   Search  
Register  Login
Board index PHP PEAR and PECL

quickForm - adding custom attributes to process functio

Do you have questions regarding Pecl or Pear? ask here!

Moderators: macek, egami, gesf

quickForm - adding custom attributes to process functio

Postby Riku Tuominen » Sun Aug 13, 2006 1:18 am

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

I CHANGED THE EXAMPLE CODE, MAYBE THIS CAN BE SOLVED.

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
/**
* Performs the form data processing
*
* @param mixed $callback Callback, either function name or array(&$object, 'method')
* @param bool $mergeFiles Whether uploaded files should be processed too
* @since 1.0
* @access public
* @throws HTML_QuickForm_Error
*/
// definition of the function is displayed at: http://pear.php.net/manual/en/package.html.html-quickform.html-quickform.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]
Last edited by Riku Tuominen on Tue Aug 22, 2006 3:27 am, edited 5 times in total.
Riku Tuominen
New php-forum User
New php-forum User
 
Posts: 17
Joined: Wed May 04, 2005 11:37 pm

Postby Riku Tuominen » Wed Aug 16, 2006 6:52 am

I still hope to get some help on this.
This is crusial for me to get working for my project!

Please someone.
Riku Tuominen
New php-forum User
New php-forum User
 
Posts: 17
Joined: Wed May 04, 2005 11:37 pm

Postby Riku Tuominen » Mon Aug 21, 2006 1:10 pm

I chaged the code example in hope my problem is more understandable!
Riku Tuominen
New php-forum User
New php-forum User
 
Posts: 17
Joined: Wed May 04, 2005 11:37 pm

Postby Riku Tuominen » Wed Aug 23, 2006 11:08 am

Well I solved the problem.

I missunderstod the purpose of the function.
I tried to send attributes to the function.
Insted I should have sent only on object which has all the needed attributes and process_data function.

Now I have it working. :)
Riku Tuominen
New php-forum User
New php-forum User
 
Posts: 17
Joined: Wed May 04, 2005 11:37 pm

herve leger sequin dress cheapest Herve Leger on s

Postby galloway8 » Thu May 16, 2013 3:11 am

We all know that teenagers are aggressive and one of their exciting hobbies is car driving. In every sate, teenage car accidents is rampant and it is so alarming to the part of the government as well as their parents. Hence, the parent of a teenager who's fond of driving must see to it that their son/daughter understands the risk it takes. Car accident is not just a simple phenomena for it causes injuries that make a [url=/]herve leger shopbop[/url] certain teenager suffer for years or even cause his death. A latest statistics shows that the number of car accidents is increasing and teenagers are in the high percentage. Every car accident lawyer and professionals are aware of that happenings so they are giving more attention pink [url=/]herve leger[/url] to enlighten the driver herve leger rent the runway to be more responsible in their ways of driving.
Cause Of Teenage Car Accidents
As mentioned above, teenagers are aggressive. The reason for this is that they are in the transition stage that push them to wholesale herve leger do some new herve leger outlet sale things especially the exciting one. In the modern society, we are aware that most of them are fond of driving at night and driving while they are under the influence of an alcohol. Well, a lawyer knows this trait that lead those teenagers in danger of a car accident. Another factor which contributes to the risk is the insufficient knowledge especially those who don't have a driving license.
Sad to say that some parents are too busy to supervise their children. They are just taking the car accident for granted since that they have a trust on the driving capability of their teenagers. Well, this is the greatest mistake! Even that you know how careful your son is, there's still a tendency to be involved in a car accident. Okay, let's have a further explanation. What if your son is being invited to a car racing? Perhaps, he would surely agree to make himself ?in? to the group. So, are you just allowing him to do such thing? But, how could you know his plans if in the first place he could never tell you about [url=/]herve leger online store[/url] that? What I am emphasizing is that, as a parent, you have to limit his freedom in driving.
How A Car Accident Lawyer Help You In The Case
If you are a parent of a teenager who was involved in a car accident, you have to seek the help of an expert car accident lawyer to defend your child. The lawyer will assist you in getting the facts of the accident. Actually, a lawyer will also get the statement of your child to have a clear view of the incident.
Remember, there are lots of things to be processed in handling a car accident case. If you believe that you are in the right side to defend you child, you have to prove the negligence of the other party through the assistance of your personal lawyer.
Lessons Learned
Perhaps, this traumatic accident might have opened the eyes of teenagers to the danger of the world if they are not careful in their ways especially in driving. As a parent, you have to remind them always to lessen the risk of accidents. It is also an advantage to warn them against drunk driving and over speeding.

Related articles:


herve legers cheapest Herve Leger on sale (43)

herve leger shop cheapest Herve Leger on sale (1)

herve leger cheapest Herve Leger on sale (5)
galloway8
New php-forum User
New php-forum User
 
Posts: 127
Joined: Mon Jan 07, 2013 3:36 am


Return to PEAR and PECL

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.