<P>Hi, </P>
<P>I am looking for a solution to the problem of using both editing and adding using formulator. Ran into the following page, on the web, which asks the same question so well, that I am just quoting it here. </P>
<P>U can find it in the following link:</P>
<P><A href="http://www.geocrawler.com/archives/3/12572/2002/11/0/10166843/">http://www.geocrawler.com/archives/3/12572/2002/11/0/10166843/</A></P>
<P>The problem is as follows:</P>
<P>How do people structure and name their Formulator forms and Zope trees so<BR>the same form can be shared between add and edit functions?&nbsp; For example, if<BR>I have an SQL table like so:<BR><BR>&nbsp;&nbsp;&nbsp; create table person (<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; last_name character varying(80),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; first_name character varying(80),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; middle_name character varying(80),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ssn character varying(80),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; email character varying(80)<BR>&nbsp;&nbsp;&nbsp; );<BR><BR>I'd like the same form to be usable for both adding new people and editing<BR>the information for people already in the database.&nbsp; I'm using page<BR>templates, so that might make a difference as well.&nbsp; Currently, I have a<BR>structure which looks like this<BR><BR>&nbsp;&nbsp;&nbsp;
 person<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; form<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; index_html<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; input_form<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; do_action<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; edit<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; index_html<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; input_form<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; do_action<BR><BR>where "form" is a Formulator object, index_html displays either a blank or<BR>filled in form using input_form, and do_action performs the necessary<BR>database insert or update operations.&nbsp; Where should my form go and how<BR>should I refer to fields?&nbsp; Though I use a single Formulator form, I wind up<BR>duplicating the actual HTML
 &lt;form&gt; (in input_form) because in one case I use<BR>the Formulator defaults and in the other case I fill in values for the<BR>fields dredged from my database.&nbsp; In my add &lt;form&gt;:<BR><BR>&nbsp; &lt;th class="form-label"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tal:content="python: here.utils.field_title(here.form.city)"&gt;title&lt;/th&gt;<BR>&nbsp; &lt;td tal:content="structure here/form/city/render"&gt;item&lt;/td&gt;<BR><BR>In my edit &lt;form&gt;:<BR><BR>&nbsp; &lt;th class="form-label"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tal:content="python: here.utils.field_title(here.form.city)"&gt;title&lt;/th&gt;<BR>&nbsp; &lt;td tal:content="structure python: here.form.city.render(options['city'])"&gt;item&lt;/td&gt;<BR><BR>Lots of duplication, as you might imagine.<BR><BR>Also, do I need to use python: to pass a parameter to here/form/city/render<BR>or can I do that somehow from ptl?<BR><BR>I realize this is probably more of a page template question, but you folks<BR>are the ones
 who must want to share your forms, so I thought you'd have more<BR>direct experience.<BR></P>
<P>===========</P>
<P>looking forward for a quick response..</P>
<P>Regards</P>
<P>Subhankar</P>
<P>&nbsp;</P><p><font face=arial size=-1><img src="http://in.yimg.com/i/in/mobile/pctomob.gif" width=28 height=22 border=0 alt="Yahoo! India Mobile"></a>
<a href="http://in.mobile.yahoo.com/new/pc/" target="_blank"><b>SMS</b></a> using the Yahoo! 
<a href="http://in.mobile.yahoo.com/new/pc/"><b>Messenger</a>;</b></font>
<font face=arial size=-1><b>
<a href="http://in.messenger.yahoo.com/">Download</b></a> latest version.</font>