<html>
<body>
<font size=5><br>
</font>Dear All,<br><br>
I do not know what I am doing wrong here. when I executed the below codes
it gives the error below for both true and false conditions, but when i
change the line 1 to <b><dtml-if "email "></b> it stop
giving the error but allow user sending without entering email address.
<br><br>
<br>
<b><dtml-if "email and '@' in email"><br><br>
</b><dtml-sendmail smtphost="mail.domain.com"><br>
To: <advert@domain.com><br>
From: <<dtml-var email>><br>
cc: <kamal@dv.net><br>
Subject: Advert Placement <br><br>
<br>
Name: <dtml-var fullnames><br><br>
Company Name: <dtml-var company><br><br>
</dtml-sendmail><br><br>
<dtml-else><br><br>
<P>Please complete all of the required
fields.<br><br>
The following fields are missing:</P><br><br>
<dtml-comment><br>
Display the emtpy fields. Repeat the <dtml-if
"requiredfieldname ==''">....</dtml-if> for each field
you want to display.<br>
</dtml-comment><br><br>
<dtml-if "email == ''"><br>
E-mail address</p><br>
</dtml-if><br>
<br>
<br>
</dtml-if><br><br>
<br><br>
An error was encountered while publishing this resource. <br><br>
<b>TypeError<br>
</b>Sorry, a site error occurred. <br><br>
Traceback (innermost last):
<ul>
<li>Module ZPublisher.Publish, line 150, in publish_module
<li>Module ZPublisher.Publish, line 114, in publish
<li>Module Zope.App.startup, line 182, in zpublisher_exception_hook
<li>Module ZPublisher.Publish, line 98, in publish
<li>Module ZPublisher.mapply, line 88, in mapply
<li>Module ZPublisher.Publish, line 39, in call_object
<li>Module OFS.DTMLMethod, line 126, in __call__
<li>Module DocumentTemplate.DT_String, line 474, in __call__
<li>Module OFS.DTMLMethod, line 119, in __call__
<li>Module DocumentTemplate.DT_String, line 474, in __call__
<li>Module OFS.DTMLMethod, line 119, in __call__
<li>Module DocumentTemplate.DT_String, line 474, in __call__
<li>Module DocumentTemplate.DT_Util, line 201, in eval
<li>__traceback_info__: email
<li>Module <string>, line 2, in f
<li>Module OFS.ObjectManager, line 645, in __getitem__
<li>Module OFS.ObjectManager, line 237, in _getOb
</ul>TypeError: unsliceable object (Also, an error occurred while
attempting to render the standard error message. <br>
</body>
</html>