Progress Bar with AutoValidator?


Well-known member
So, I have a form. This form has an "duperow" button which basically duplicates a text entry field. Theoretically, a user could submit a large amount of rows to this form. In this case, lets say the user is submitting 1000 strings.

This form is submitting these fields as a simple array. I am then taking these inputs, looping through them, and submitting them to the matching datawriter. This of course means there are 1000 datawriter actions in this submit. This all works fine.

The problem is, this action could take a bit. With 1000 writes, it could take 60 seconds before its done. So the end user is sitting at a blank screen, not knowning whats going on for quite a bit.

For examples sake, lets say the code below is what I am doing:
if ($this->_request->isPost())
    $entries = $this->_input->filterSingle('entries', XenForo_Input::ARRAY_SIMPLE);
    foreach ($entries AS $entry)
    return $this->responseRedirect(XenForo_ControllerResponse_Redirect::SUCCESS,...);

What I would like to do is add a progress bar to this. Anyone got any ideas?


Well-known member
I think this library might be help. library/Zend/ProgressBar and this class Zend_ProgressBar_Adapter_JsPush very usefull.