[albatross-users] setting value field
Eric S. Johansson
esj at harvee.org
Wed Jun 25 13:40:08 EST 2003
Michael C. Neel wrote:
> In my apps I use the name of the submit button to control flow, using
> the ctx.req_equals().
>
> Normally looks something like:
>
> if self.page = "mystuff/form.html":
>
> if ctx.req_equals("saveme"):
> #save the record
> elif ctx.req_equals("delme"):
> # delete the record
> etc....
ah. more missing pieces are falling into place.
> As for setting values in an al-input; you don't need to do anything. If
> ctx.locals.name = 'Mike', and your tag is <al-input type="text"
> name="name"> albatross will write out <al-input type="text" name="name"
> value="Mike">.
so you are saying that the value of the name used for the name field is applied
to the value field. It's marvelously simple and quite intuitive once you know
it's there!!
is this documented anywhere? I would love to know where my brain skiped the groove.
more questions tomorrow as I puzzle out the joys of state preservation
---eric
More information about the Albatross-users
mailing list