[ic] [button] and mv_form_profile question.

Mike Heins interchange-users@icdevgroup.org
Sat Mar 15 23:26:01 2003


Quoting Jeff Dafoe (jeff@badtz-maru.com):
> > This is the only IC issue to which I really don't have an answer that I
> like,
> > > which is how to programatically set a form profile without using any
> > > client-side settings.
> >
> > Think about this. How could you ever do that without checking every
> > single page request for it?
> 
>     I don't understand the IC code well enough to comment intelligently, but
> the "ideal" solution would be to be able to set the mv_form_profile in an
> mv_click block.

Yes, but chicken before egg? mv_form_profile is designed to check
things *before* an mv_click. An mv_click is an action.

If you want to do another check *after* or *in* an action, there
are many options. First of all, you can just code the check in Perl.
Second, you can set mv_click=some_check_profile and mv_todo=submit.
Third, you can use the UI tag [run-profile].

[set check_something]
	foo=required
[/set]

	[button]
		[if type=explicit compare="[run-profile check_something]"]
			[do-what-you-do]
		[/if]
	[/button]

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

I don't want to get to the end of my life and find I have just
lived the length of it. I want to have lived the width of it as
well. -- Diane Ackerman