The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (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
Subscription Integration
#10
UserSpice was actually the project I used to teach myself php a few years ago...so I get the fun and the struggles with it.

The form builder was something I wrote on a long plane ride from Africa or something when I didn't have internet, so it was kind of a fun project. It will never be as versatile as coding by hand, but it definitely has its uses.

So regarding the other things like sticking more info in secretly, there are ways to do that.
So basically, you can create the other form fields that you want to create normally and then you go to the views thing and make a "view" of just the form fields that you actually want to show. The instead of displaying the form, you display the view.

So one of the things with doing hidden form fields is that the user can change them in the chrome inspector. They can't do that with the "logged in" info that you have when someone logs in. So I'll give you a quick example. Let's say that you want to store the username.

Add a field with the column name username
Don't show that column in the view
Display the view.
Then when you do the form processing do...

if(!empty($_POST)){
$response = preProcessForm();
if($response['form_valid'] == true){
$response['fields']['username']=$user->data()->username;
$response = postProcessForm();
}
}

This is pulling in the username from the database instead of anything that they can alter. In fact, you can refer to any item in the users table with $user->data()->columNameFromTheDatabase

Anyway, please don't hesitate to ask for help if anything doesn't make sense.
  Reply


Messages In This Thread
Subscription Integration - by nschoultz - 09-24-2018, 06:37 PM
RE: Subscription Integration - by Brandin - 09-27-2018, 09:41 PM
RE: Subscription Integration - by TheCj - 01-31-2019, 04:32 AM
RE: Subscription Integration - by Brandin - 01-31-2019, 03:33 PM
RE: Subscription Integration - by nschoultz - 01-31-2019, 04:09 PM
RE: Subscription Integration - by mudmin - 01-31-2019, 05:17 PM
RE: Subscription Integration - by nschoultz - 01-31-2019, 09:25 PM
RE: Subscription Integration - by mudmin - 01-31-2019, 09:27 PM
RE: Subscription Integration - by nschoultz - 01-31-2019, 11:01 PM
RE: Subscription Integration - by mudmin - 01-31-2019, 11:15 PM
RE: Subscription Integration - by TheCj - 02-01-2019, 12:35 AM

Forum Jump:


Users browsing this thread: 6 Guest(s)