On Thu, Feb 25, 2010 at 12:40 PM, Richard <richard.m.willi...@gmail.com> wrote:
> I have pages that I've created with standard HTML forms and javascript
> validation. What is the fastest or best way to use them in my Lift
> app? Do I have to completely rewrite in Lift snippets using JsCmds in
> order to tie into the already named fields and form, or is there
> something I'm missing?
>

You can retrieve values from legacy forms using the S.param function.
In order to ensure that the appropriate session data is transmitted, I
would convert the key bits of your legacy HTML into templates.

IMO, you might be better off just converting the rest of the way to
Lift and use the bind function to tie your form values to lift
variables, you also gain security from replay and xss attacks, because
the field names are randomized.

You can still use your custom validators, you will just have to
specify that the jsCmds call your validators.
(It is easy to call legacy functions by name via lift js, it's just
rather difficult to do the opposite, because the lift generated
function names are random strings)

See http://wiki.liftweb.net/index.php/Hello_Darwin#add_form for a
brief comparison between the two options.

Hope that helps.

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@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