[Zope] TAL + <select> + record modifier

Ruslan Spivak alienoid@is.lg.ua
Thu, 13 Mar 2003 12:59:26 +0200


Hello, zope users!


I have script getServiceMapping that return a list of dictionaries, like:
[{'type_name' : 'xxx',
   'title' : 'ccc',
   'groupname' : 'vvv'
  },
  {'type_name' : 'xxx1',
   'title' : 'ccc1',
   'groupname' : 'vvv'
  },
]

I want user to be able to use <select> staement, and i need to pass 
three variables to form handler, how to implement that?
Maybe 'record' modifier? But i can't make it working with select properly.

Here i can get only one varibale - type_name, and how to pass another 
2(title and groupname)?

<form name="client_addservice_form"
	    method="post"
	    action="folder_object"
	    tal:define="types here.getServiceMapping();
	                no_types python:len(types);"
	    tal:attributes="action here/absolute_url">
	<select name="type_name">
	  <option value="Select">Select</option>
	  <metal:block tal:repeat="ctype types">
	    <option value="Document"
		    tal:attributes="value ctype/type_name"
	            tal:content="ctype/tilte"
	            i18n:translate="">Document</option>
	  </metal:block>
	</select>
</form>

Thanks in advance,
Ruslan