I have a CMF Action to edit custom archetype type metadata, where author is one of the fields to be edited. The following code in editing form template is for StringFiled:
<input type="text"
name="new_author:list"
value="author"
size="40"
tal:condition="canModifyItem"
tal:attributes="value obj/getAuthor;
id string:${item}_author;" />
If I change the field from ‘author’ to ‘authors’, using LinesField instead of StringField, how can I update the template for input multiple lines of data (one name per line)?
you have to use a textarea, instead of input tag, and parse the input data through a split(‘/n’) in order to get a list of inputed lines.
also,
instead of tal:attributes=”value… you have to use tal:content=”obj/getAuthor”
hth