)
Jonathan
- Original Message -
From:
Muk Yan
To:
Jonathan
Cc:
zope@zope.org
Sent: Thursday, August 17, 2006 4:40
PM
Subject: Re: [Zope] Python Scripts and
HTML Forms
Hey All,Sorry about that, what I meant is that I get a
KeyError. It says that the first_name
Dear Trusted Zope Zealots,This subject was a bit too broad to do a google search on, because I've tried and the lack of relevancy was astounding.I've probably been committing a cardinal sin in DTML, but I couldn't figure any other work around.
I have an HTML form in a DTML Document say:form
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 17 Aug 2006, at 14:57, Muk Yan wrote:
What my question is, is there anyway to directly access
first_name from the form in the python script without having to
have to call the dtml-call REQUEST.SESSION.set('firstName',
first_name) and then
On Thursday 17 August 2006 1:57 pm, Muk Yan wrote:
Name:input type=text name:first_name
Make that:
input type=text name=first_name
DTML Method, process_this_form:
dtml-call REQUEST.SESSION.set ('firstName', first_name)
dtml-call this_is_a_python_script()
and in the Python Script,
On Thursday 17 August 2006 2:02 pm, Jens Vagelpohl wrote:
request.get(MY_VARIABLE) ???
The one major problem with that is that it ties you to getting information
from the request. Better to write a script with explicit parameters and
call it with those parameters. Then, you can pull values
'):
or
if REQUEST.get('first_name',
None):
hth
Jonathan
- Original Message -
From:
Muk Yan
To: zope@zope.org
Sent: Thursday, August 17, 2006 2:57
PM
Subject: [Zope] Python Scripts and HTML
Forms
Dear Trusted Zope Zealots,This subject was a bit too
broad to do a google
check for the presence of a form variable
by
if
REQUEST.has_key('first_name'):
or
if REQUEST.get('first_name',
None):
hth
Jonathan
- Original Message -
From:
Muk Yan
To:
zope@zope.org
Sent: Thursday, August 17, 2006 2:57
PM
Subject: [Zope] Python Scripts and HTML
2006 4:20
PM
Subject: Re: [Zope] Python Scripts and
HTML Forms
Hey Jonathan, All,Thanks I tried your solution, but it
doesn't seem to work. Can anybody shed some more light on this
situation, since what Jonathan provides is exactly what I want to do, but it's
not working.Am I forgett
PM
Subject: Re: [Zope] Python Scripts and
HTML Forms
Hey Jonathan, All,Thanks I tried your solution, but it
doesn't seem to work. Can anybody shed some more light on this
situation, since what Jonathan provides is exactly what I want to do, but it's
not working.Am I forgetting to put
rresponding form field (an entry is made in REQUEST only when
data is entered in the form field)
Jonathan
- Original Message -
From:
Muk Yan
To: Jonathan
Cc: zope@zope.org
Sent: Thursday, August 17, 2006 4:40
PM
Subject: Re: [Zope] Python Scripts and
HTML Forms
At Thursday 17/8/2006 17:40, Muk Yan wrote:
Sorry about that, what I meant is that I get a KeyError. It says
that the first_name in REQUEST['first_name'] is not found, when I
try to set the variable in line in the script where fname =
REQUEST['first_name'].
Read the previous responses, you
11 matches
Mail list logo