Hi everyone!
Here is my problem..
Department field is a required field into a hidden subform (form1.Page1.REPLACEMENT_SUB).
The problem it is when I click the email button it's ask me to fill in
the above field(Department)!
I have a DDList with two item (Employee Name,Department).
The Department field becomes available(visible) if I select Department from DDL.
Please help!
Here is my variable:
function Ex1ValidFields()
{
var bRtn = false;
var aErrMsg = [];
var rgEmpty = /^\s*$/;
if((form1.Page1.Section_A.EmployeeName.rawValue == null) || rgEmpty.test(form1.Page1.Section_A.EmployeeName.rawValue))
aErrMsg.push("Employee Name");
if(( form1.Page1.REPLACEMENT_SUB.Department.rawValue == null) || rgEmpty.test(form1.Page1.REPLACEMENT_SUB.Department.rawValue))
aErrMsg.push("Department Name");
if(aErrMsg.length == 0)
bRtn = true;
else
app.alert("One or more required fields have not been filled out:\n\n * " + aErrMsg.join("\n * "),4);;
return bRtn;
}
For email button on click event I have the script below:
if(Init.Ex1ValidFields())
var myDoc = event.target;
var address = "aaa@bbb.org";
var sub = "Staffing Req - ";
var Sender =(form1.Page1.Section_A.EmployeeInfo.Row1.PositionTitle.rawValue);
var msgBody = "See my Form attached.\n\nThank You!";
cTo: address,
cSubject: sub + Sender,
cMsg: msgBody + "\n\nRegards\n",
cSubmitAs: "PDF"});
Hi,
The script that changes the presence of the REPLACEMENT_SUB subform, should also set the mandatory property of the dropdown. See an example here: http://assure.ly/hxHupW.
Hope that helps,
Niall
here is my file:
https://acrobat.com/#d=jqF1EDVB0j5kdojAOi9dCQ
With thw DDlist I control visible and hidden subforms with MANDATORY AND NON MANDATORY FIELDS.
Also in a change event with a script I try to make mandatory field to become non mandatory in case
subform is hidden and vice versa!
But the The variable script seems to override the change event script!
With the variable script(Joseph) I inform user for missing entering data into specific field.
How I will make the variable script9Joseph) to work?
I need to indicate user where exactly there is missing data.
Thank you
North America
Europe, Middle East and Africa
Asia Pacific