on 05-18-2009 3:19 PM
Hi,
I am using following code for sending interactive form through E-mail & also CCing to 5 people.
I need an option to make CC fields(CEmail) as optional & email field(IEMAIL) as mandatory.
var lEmail = xfa.record.ITEM.PEMAI.value;
var CEmail = xfa.record.ITEM.PPCC1.value+";"+xfa.record.ITEM.PPCC2.value+
";"+xfa.record.ITEM.PPCC3.value+";"+xfa.record.ITEM.PPCC4.value+";"
+xfa.record.ITEM.PPCC5.value;
var myDoc = event.target;
try {
myDoc.mailDoc({
bUI: false,
cTo: lEmail,
cCc: CEmail,
cSubject: "Document",
cMsg: "Dear Customer,.........."
});
} catch (e)
What code changes should I make? becasue i am getting a message saying"null" is not acceptable.
Rgds
vara
Hi,
For the send or submit button check whether the EmailId field is null or not and display an error message, for CC Email dont check for mandatory , but use the code as below;
var lEmail = xfa.record.ITEM.PEMAI.rawValue;
var CEmail = xfa.record.ITEM.PPCC1.rawValue+";"+xfa.record.ITEM.PPCC2.rawValue+
";"+xfa.record.ITEM.PPCC3.rawValue+";"+xfa.record.ITEM.PPCC4.rawValue+";"
+xfa.record.ITEM.PPCC5.rawValue;
if ( IEmail == null )
{
xfa.host.messageBox("Please enter the Email");
}
elseif
{
if ( xfa.record.ITEM.PPCC1.rawValue != null || xfa.record.ITEM.PPCC2.rawValue != null ||
xfa.record.ITEM.PPCC3.rawValue != null || xfa.record.ITEM.PPCC4.rawValue != null ||
xfa.record.ITEM.PPCC5.rawValue != null )
{
var myDoc = event.target;
try {
myDoc.mailDoc({
bUI: false,
cTo: lEmail,
cCc: CEmail,
cSubject: "Document",
cMsg: "Dear Customer,.........."
});
} catch (e)
}
else
{
var myDoc = event.target;
try {
myDoc.mailDoc({
bUI: false,
cTo: lEmail,
cSubject: "Document",
cMsg: "Dear Customer,.........."
});
} catch (e)
}
}
Thanks and Regards
Pradeep Goli
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.