[albatross-users] setting value field

Michael C. Neel neel at mediapulse.com
Wed Jun 25 04:55:54 EST 2003


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....

Note: if you us images for sumbit buttons, then you nees to do
ctx.req_equals("saveme.x") - I'm not sure if that's still true in
1.10pre1

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">.

Mike



More information about the Albatross-users mailing list