Portable class for a wizard form

Glad you’re getting some use out of the Wizard component!

Generally speaking, the component is a client side way of collecting data from the user. Because it’s on the client, it’s subject to the usual sorts of tampering by bad actors, so you can’t really rely on any security checks that are part of the wizard process.

I could see using the wizard to populate a portable class, which then would take care of updating itself on the server. The capabilities checks on the server would prevent bad actors from doing things they aren’t supposed to.

But it sounds like you want something more than that, you’d like the steps in the component to be data driven? If that’s the case, I’d look at the InputBox component: Input_box() and alert2() It allows you to easily create individual forms programmatically, instead of needing to hand create them.

Back to the original question:

Generally speaking, client side global variables via modules are fine. I don’t know that I’d recommend a single instance of a portable class serving the entire client, though. That seems counter to how portable classes are intended to work. You’re supposed to grab instances from the server as needed so the server can set the capabilities appropriately.

I wouldn’t recommend pickling and saving to the DB. There’s no reason to save the entire instance, you just want the data needed to recreate the instance (e.g. using a simple object column).

If I’ve completely misunderstood what you’re looking to do, sorry about that!