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.
Here is my variable:
var bRtn = false;
var aErrMsg = ;
var rgEmpty = /^\s*$/;
if((form1.Page1.Section_A.EmployeeName.rawValue == null) || rgEmpty.test(form1.Page1.Section_A.EmployeeName.rawValue))
if(( form1.Page1.REPLACEMENT_SUB.Department.rawValue == null) || rgEmpty.test(form1.Page1.REPLACEMENT_SUB.Department.rawValue))
if(aErrMsg.length == 0)
bRtn = true;
app.alert("One or more required fields have not been filled out:\n\n * " + aErrMsg.join("\n * "),4);;
For email button on click event I have the script below:
var myDoc = event.target;
var address = "firstname.lastname@example.org";
var sub = "Staffing Req - ";
var Sender =(form1.Page1.Section_A.EmployeeInfo.Row1.PositionTitle.rawValue);
var msgBody = "See my Form attached.\n\nThank You!";
cSubject: sub + Sender,
cMsg: msgBody + "\n\nRegards\n",
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,
here is my file:
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.
Europe, Middle East and Africa