[prev in list] [next in list] [prev in thread] [next in thread]
List: sitemanager-devel
Subject: Re: Polls and Smartforms
From: Shannon Weyrick <weyrick () roadsend ! com>
Date: 2001-10-05 17:58:06
[Download RAW message or body]
On Friday 05 October 2001 06:15 am, you wrote:
>
> Hi.
>
> I'd make the smartform run and output on the 'leftnav' module as usual.
>
> To use the form's variables in other modules you just need to add the
> form's inputs added as InVars to those modules. I.e if you have:
> navleft.mod:
> $smartform->add('foo', 'Input foo!', 'text', ........ );
>
> then do:
> main.mod:
> $this->addInVar('foo', 'Default foo', 'string');
>
> , then use $this->getVar('foo') later in main.mod to access the user's
> input to foo. This is what InVars do :)
>
> Beware, you'll lose the automatic filtering functionality cos main.mod
> gets those InVars even if their input is 'bad'. Just run your own checks
> if you need to, and you'll be all right I suppose.
This will work, but there shouldn't be a need to post variables from a
smartform in one module, to another module (in this case, anyway).
In the poll module, when a user submits their entry, the dataVerified() block
in that module should write the results to a database. When the page reloads,
a codePlate could determine (from a hidden variable in the first form,
perhaps) if a poll entry had just been received, and load the viewer module
instead of the poll module at that point.
Make sense?
Shannon
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic