02-01-2019, 09:45 PM
Thanks again,
With the regular form submit method, no problem, when I try to use the preProcessxxxx and postProxxxxxx then I get an error.
Am about to spin another VPS server up to check this with even though I am not sure it would be due to being on XAMPP.
Error is:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function postProcessForm(), 0 passed in C:\xampp\htdocs\cj_page.php on line 16 and at least 1 expected in C:\xampp\htdocs\users\helpers\forms.php:441
The Form is created with the hidden variables you mentioned named username and userid (did also try them as text rather than hidden)
A view is created with just the sample textbox.
p.s did add that code from PasteBin you provided, was that for the radio buttons "required" option being ignored?
Thanks
Chris
Unsure if I have missed something, have tried number times and the same result, sorry in advance if this is something I have goofed.
With the regular form submit method, no problem, when I try to use the preProcessxxxx and postProxxxxxx then I get an error.
Am about to spin another VPS server up to check this with even though I am not sure it would be due to being on XAMPP.
Error is:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function postProcessForm(), 0 passed in C:\xampp\htdocs\cj_page.php on line 16 and at least 1 expected in C:\xampp\htdocs\users\helpers\forms.php:441
The Form is created with the hidden variables you mentioned named username and userid (did also try them as text rather than hidden)
A view is created with just the sample textbox.
p.s did add that code from PasteBin you provided, was that for the radio buttons "required" option being ignored?
Thanks
Chris
Code:
<?php
if(file_exists("install/index.php")){
//perform redirect if installer files exist
//this if{} block may be deleted once installed
header("Location: install/index.php");
}
require_once 'users/init.php';
if(!empty($_POST)){
$response = preProcessForm();
if($response['form_valid'] == true){
$response['fields']['username']=$user->data()->username;
$response['fields']['userid']=$user->data()->id;
$response = postProcessForm();
}
}
require_once $abs_us_root.$us_url_root.'users/includes/template/prep.php';
if(isset($user) && $user->isLoggedIn()){
}
?>
<div id="page-wrapper">
<div class="container">
<div class="jumbotron">
<h1 align="center">Welcome to <?php echo $settings->site_name;?></h1>
<p align="center" class="text-muted">An Open Source PHP User Management Framework. </p>
<p align="center">
<?php
displayView(9);
?>
</p>
<br>
<p align="center">You have successfully installed UserSpice!<br>To view our getting started documentation, please visit</p>
<h4 align="center"><a href="https://userspice.com/getting-started/">https://userspice.com/getting-started/</a></h4>
</div>
</div>
</div>
<!-- Place any per-page javascript here -->
<?php require_once $abs_us_root . $us_url_root . 'usersc/templates/' . $settings->template . '/footer.php'; //custom template footer ?>
Unsure if I have missed something, have tried number times and the same result, sorry in advance if this is something I have goofed.
Creativity is like a fart, push too hard and it usually ends in tears, that't the polite version anyway patented to me