From: Michael campbell Date: 2004-01-30T09:37:04+09:00 Subject: amrita and checkboxes How does one control whether or not a checkbox is "checked" using amrita? I'm familiar with using the a(:attr => value) form for modifying an attribute WITHIN a tag, but this attribute is either present or absent, it doesn't have a value as such. If I leave out the symbol, the entire tag is eliminated, not just the attribute within it. Below, the "1" form is printed with "checked=on" as expected; the "2" form prints nothing; the entire text from
to
is eliminated, when all I want is the "checked" attribute WITHIN the tag to go away, not the whole thing. Thoughts welcome. require 'amrita/template' include Amrita t = TemplateText.new <<-html
html data = { :form => a(:action => 'myform.cgi', :checked => "on") } puts "1" t.expand(STDOUT, data) puts "2" data = { :form => a(:action => 'myform.cgi') }