Forum Index
/
General
/
getPage return all pages in form ?
[
This topic is solved ]
kreatik
27 July 08 / 11:10
Changed at 27 July 08 / 11:10
Hello,
How to get the actual page of form ?
Johan Wiegel
(Admin)
27 July 08 / 12:30
Changed at 27 July 08 / 12:37
http://www.formhandler.net/manual/73/GetPage_*.html
example:
<?php
// include the class
include
'includes/FH3/class.FormHandler.php'
;
Function
doRun
(
$aData
)
{
print_r
(
$aData
);
}
$oForm
= new
FormHandler
();
$oForm
->
TextField
(
'Field 1'
,
'Field1'
);
$oForm
->
SubmitButton
(
'Next page'
);
$oForm
->
NewPage
();
$oForm
->
AddHTML
(
'<tr><td colspan="2">page: '
.
$oForm
->
GetPage
().
'</td></tr>'
);
$oForm
->
TextField
(
'Field 2'
,
'Field2'
);
$oForm
->
SubmitButton
(
'Next page'
);
$oForm
->
NewPage
();
$oForm
->
AddHTML
(
'<tr><td colspan="2">page: '
.
$oForm
->
GetPage
().
'</td></tr>'
);
$oForm
->
TextField
(
'Field 3'
,
'Field3'
);
$oForm
->
SubmitButton
(
'Next page'
);
$oForm
->
NewPage
();
$oForm
->
AddHTML
(
'<tr><td colspan="2">page: '
.
$oForm
->
GetPage
().
'</td></tr>'
);
$oForm
->
TextField
(
'Field 4'
,
'Field4'
);
$oForm
->
SubmitButton
();
$oForm
->
onCorrect
(
'doRun'
);
$oForm
->
Flush
();
?>
kreatik
31 July 08 / 16:27
okay, but how to get the actual page of form everywhere in the page ?
kreatik
31 July 08 / 16:30
Changed at 31 July 08 / 16:30
Found with : _curPage
But _curPage return actual page -1.
Johan Wiegel
(Admin)
31 July 08 / 17:28
Changed at 31 July 08 / 17:29
Quote:
kreatik
Found with : _curPage
But _curPage return actual page -1.
what is wrong with: $oForm->GetPage()???
that is ment to give you the current page.
kreatik
13 August 08 / 23:55
getPage() work fine but return the current page in current position in php code of form.
_curpage return the current page viewed actually of the form.
Top
powered by
PHP-GLOBE
© 2004 - 2008 FormHandler. All rights reserved. -
Open source license