1. I just pushed a little change that allows:

<lift:MySnippet form="post" action="/search">
...
</lift:MySnippet>

2. You can also do

<form method="post" action="/search">
<lift:mysnippet>

  <f:inputSearch/>
  <f:submit/>

</mysnippet>

</form>

In both cases you can use Lift's html abstractions such as SHtml.text
etc. and bind your function. In the second example we used a snippet
that has no idea about form ... it is just wrapped by a form. So in
both cases you don't really need to call S.attr to manually get
parameters.

Br's,
Marius

On Aug 25, 6:24 pm, David Pollak <feeder.of.the.be...@gmail.com>
wrote:
> On Tue, Aug 25, 2009 at 12:38 AM, Ulises <ulises.cerv...@gmail.com> wrote:
>
> > Hey people,
>
> > I'm trying to have a form be submitted to a different page (so, not a
> > POST/GET back). The scenario is a search form which renders on a front
> > page as well as on the search page.
>
> > E.g.:
>
> > /index
> >  should include a form that submits to /search
>
> > /search
> >  form that submits to itself
>
> <form method="post" action="/search"><input type="text" name="search"
> value=""/><input type="submit" value="Search"/></form>
>
> In the snippet that handles the search page:
>
> val searchTerm = S.param("search") openOr {S.error("no search term");
> S.redirectTo(S.referer openOr "/")}
>
>
>
> > Any hints on how to do this/were to look to learn how to do this? I
> > guess that the form on the front page could be just static HTML
> > however I'm not entirely sure how /search would deal with the form
> > submission from a static form ...
>
> > Cheers,
>
> > Ulises
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
> Follow me:http://twitter.com/dpp
> Git some:http://github.com/dpp
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to