Bug #5942
Multistep forms are limited to 9 pages ( no 10 + pages possible)
| Status: | Closed | Start date: | 2010-01-09 | |
|---|---|---|---|---|
| Priority: | Must have | Due date: | ||
| Assignee: | - | % Done: | 100% |
|
| Category: | Controller | |||
| Target version: | - | |||
| Votes: | 0 |
Description
Due to the code in the protected function findCurrentStep() only 9 pages can be used for multistepp forms.
The 10th page transforms to page 1.
I used this adaption to correct this behaviour:
if (strstr($pname,'step-')) {
# get more chars
# $mpPage = substr($pname,strpos($pname, 'step-'), 6);
$mpPage = substr($pname,strpos($pname, 'step-'), 8);
if (strpos($mpPage, '-')) {
# don't cut from pos x +1, instead drop the first 5 chars
# $mpPage = substr($mpPage,(strrpos($mpPage, '-') + 1));
$mpPage = substr($mpPage, 5);
} //if end
Stefan.
History
Updated by Reinhard Führicht over 3 years ago
I guess you are referring to the TER version.
This issue should already be fixed in the trunk.
The current code looks like this:
if (strstr($pname,'step-')) {
preg_match_all('/step-([0-9]+)/', $pname, $matches);
if(isset($matches[1][0])) {
$mpPage = $matches[1][0];
}
if(intVal($mpPage) > $highest) {
$highest = intVal($mpPage);
}
} // if end
Updated by Stefan Völker over 3 years ago
- % Done changed from 0 to 100
Yeah, you're right - sorry for not trying the trunk-version...
Updated by Reinhard Führicht over 3 years ago
- Status changed from New to Closed
No problem.
I should update the TER version anyway soon. There have been a lot of fixes since the last update.