The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Form builder UserId/Username
#4
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


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 Wink
  Reply


Messages In This Thread
Form builder UserId/Username - by TheCj - 02-01-2019, 03:29 AM
RE: Form builder UserId/Username - by mudmin - 02-01-2019, 12:24 PM
RE: Form builder UserId/Username - by TheCj - 02-01-2019, 09:45 PM
RE: Form builder UserId/Username - by mudmin - 02-01-2019, 12:26 PM
RE: Form builder UserId/Username - by TheCj - 02-01-2019, 11:49 PM
RE: Form builder UserId/Username - by mudmin - 02-01-2019, 11:49 PM
RE: Form builder UserId/Username - by mudmin - 02-01-2019, 11:50 PM
RE: Form builder UserId/Username - by TheCj - 02-02-2019, 12:21 AM
RE: Form builder UserId/Username - by mudmin - 02-02-2019, 12:24 AM
RE: Form builder UserId/Username - by TheCj - 02-02-2019, 12:39 AM
RE: Form builder UserId/Username - by mudmin - 02-02-2019, 09:12 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)