Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] question/suggestion for minivend form passing syntax



******    message to minivend-users from Mark Stosberg <mark@summersault.com>     ******


>   Actually, the underlying power of the process page is a bit vague
> unless you've really dug into minivend. Using the process page and
> specifying the page name in the form allows for things like minivend
> tags and order_profiles to redirect your output internally, allowing
> you much more power.

Thanks for the response Anthony.

 Using the typical CGI model, the page that I would post to would be
responsible to redirecting to one of n pages, perhaps instead of
displaying results instead. That may seem more cumbersome to you, but
since that's model I've learned in other CGI programming projects, it's
more straightforward for to do that solution (perhaps with some custom
perl that lets me redirect on arbitrarily complex criteria) than to
learn extra minivend tags to do what I already know how to do easily. 
  I realize that part of the idea behind minivend is to spend some time
up front learning new tags, and then have a quicker development model
after that, but in this case, I feel like I'm doing extra work with
minivend to  perform something I could already do quickly and easily. 

>   I'm not sure any reason why you couldn't post to a regular page as
> you suggest other than it would be more difficult to maintain. Especially
> since process tells you the page is a post, whereas otherwise there is no
> easy way to know if you have a post or a simple request. I'm sure there
> are many other reasons but these seem two of the biggest for the layout
> as it is.

I believe this issue is addressed in my recommendation because of the
"METHOD" attribute in the form tag which specifies a POST value. It's my
understanding that forms that are submitted to via a query string are
implicitly use the "GET" method. 

  -mark

> 
> On Fri, Mar 03, 2000 at 02:18:35PM -0500, Mark Stosberg wrote:
> > ******    message to minivend-users from Mark Stosberg <mark@summersault.com>     ******
> >
> >
> > Hello!
> >
> >   I'm learning how to pass around form variables in Minivend. I like
> > that once they are set, they hang around in the session after creation
> > if even aren't explicitly passed. However, I was disappointed to find
> > it's more difficult to invoke form parsing than it is using regular CGI.
> > I'll offer an example of what I'm talking about, and then a suggestion
> > for an alternative syntax. I'm interested in feedback on whether or not
> > my proposal is a feasible/reasonable idea or not.
> >
> > Here's an example of a Form POST with minivend style syntax:
> >
> > <snip>
> > <FORM ACTION="[process]" METHOD="post">
> > <INPUT TYPE="hidden" NAME="mv_nextpage" VALUE="test-2">
> > <INPUT TYPE="hidden" NAME="mv_todo" VALUE="return">
> > <INPUT TYPE=hidden NAME=foo VALUE=bar>
> > <INPUT TYPE="submit">
> > </FORM>
> > </snip>
> >
> > Here's how I'd like to work:
> >
> > <snip>
> > <FORM ACTION="[area test-2]" METHOD="post">
> > <INPUT TYPE=hidden NAME=foo VALUE=bar>
> > <INPUT TYPE="submit">
> > </snip>
> >
> > Here's my logic behind the suggestion: Why else would I put another
> > minivend page in a form tag, except to invoke form processing and return
> > a user to that page? It seems like a logical shorthand, expecially
> > coming from a CGI background.
> >
> > Additionally, let's look at how a Query String style form invocation
> > works in Minivend:
> >
> > <a href="[process]?mv_nextpage=test-2&mv_todo=return&foo=bar">Query
> > String style form submission</A>
> >
> > And Here's how I'd like to be:
> >
> > <A HREF="[area test-2]?foo=bar">How I'd like to be</A>
> >
> > I think the logic used here should be: "If any non-minivend variables
> > are passed on the query string, invoke form processing". It's seems much
> > simpler and straightforward to allow a syntax like this.
> >
> > Are there drawbacks to my suggestion that I'm unaware of? I'm interested
> > in your thoughts.
> >
> >    -mark
> >
> >   <<-------------------------------------------------------------->>
> > personal website                <    Summersault Website Design
> >    http://mark.stosberg.com/     >       http://www.summersault.com/
> > -
> > To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
> > email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
> > Archive of past messages: http://www.minivend.com/minivend/minivend-list
> 
> --
> 
> Anthony Ball                                                ant@maine.com
> MaineStreet Communications, Inc        208 Portland Road, Gray, ME  04039
> tel:1.207.657.5078         fax:1.207.657.5048       http://www.maine.com/
> -
> To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
> email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
> Archive of past messages: http://www.minivend.com/minivend/minivend-list

-- 
  <<-------------------------------------------------------------->>
personal website                <    Summersault Website Design
   http://mark.stosberg.com/     >       http://www.summersault.com/
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: