R: R: [Zope] How to create a file from a form?
I tryed to use this method but doesn't works... :( Any other help? This is the code I'm using.. The page with the form: <html> <head> <title>Creazione File di testo da un form</title> </head> <body> <form action="crea1" name="crea" method="post"> Nome<input name="Nome" type="Text" size="20"><br> Cognome<input type="Text" name="Cognome" size="20"><br> Si o No? <font size="1">Selezionare un radiobutton senza sapere se si o no</font> <input type="Radio" value="si" name="bello"><input type="Radio" value="no" name="bello"><br> Selezionami!<input type="Checkbox" value="sono il meglio!"><br> <input type="Submit" name="submit" value="Invia"> </form> </body> </html> And the page after the submit: <dtml-call "manage_addDTMLDocument(Nome,bello)"> <dtml-call expr="Nome.manage_edit(pippo,pluto)"> Thanx!
I suspect something like:
<dtml-call expr="other_document.manage_edit(...)">
Is what you need. If not show me the code you are using.
/---------------------------------------------------\ Casey Duncan, Sr. Web Developer National Legal Aid and Defender Association c.duncan@nlada.org \---------------------------------------------------/
On Thursday 18 October 2001 06:11 am, Paolo D'Aubert allegedly wrote:
I tryed to use this method but doesn't works... :(
Any other help?
This is the code I'm using.. [sni[p]
And the page after the submit:
<dtml-call "manage_addDTMLDocument(Nome,bello)"> <dtml-call expr="Nome.manage_edit(pippo,pluto)">
Thanx!
Remember, Nome is a string value coming from the form. You can't call manage_edit on a string. You can use getitem to lookup the object given its id string to do what you want: <dtml-call expr="manage_addDTMLDocument(Nome,bello)"> <dtml-call expr="_.getitem(Nome).manage_edit(pippo,pluto)"> I might suggest coding this as a Python script tho, which would make it a bit simpler: context.manage_addDTMLDocument(Nome,bello) doc = context[Nome] doc.manage_edit(pippo,pluto) The script will need Nome, bello, pippo, pluto as parameters. You'll notice that the syntax is nearly the same, minus all the <dtml-call > crap. hth, /---------------------------------------------------\ Casey Duncan, Sr. Web Developer National Legal Aid and Defender Association c.duncan@nlada.org \---------------------------------------------------/
participants (2)
-
Casey Duncan -
Paolo D'Aubert