I am creating a sign in sheet using Livecycle. I want to make certain fields required if the user starts filling in that block of fields.
This is what it looks like:
First Name
Last Name
Degree
Address
City, State, Zip
First Name
Last Name
Degree
Address
City, State, Zip
First Name
Last Name
Degree
Address
City, State, Zip
If someone fills in there first name, is there a way to require them to fill in their last name and email address?
When I have tried required fields it makes them required for the entire sheet, not that one record.
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
Sorry, had an error in my script the first line should be:
if (!this.isNull) {
or
if (!(this.isNull)) {
Extra bracket or non-closed bracket depending on your preference!
Views
Replies
Total Likes
Are you clicking the object then selecting the value tab under the object pallete?? Then choosing the dropdown of "User Entered - Required" for each filed that you want required??
Views
Replies
Total Likes
Yes. That makes the field required on the form but I need a field required when the first field is filled in.
So it needs to be something like this: If user enters a first name then require a last name and email address.
Views
Replies
Total Likes
You can set the required parameter with fieldName.mandatory = "error"; and disable it with fieldName.mandatory = "disabled";
So you could put something like the following on the Exit event of the first field:
if (!(this.isNull) { //if field isn't null
Field2.mandatory = "error";
Field3.mandatory = "error";
//etc
}
else { //if field is null
Field2.mandatory = "disabled";
Field3.mandatory = "disabled";
//etc
}
Views
Replies
Total Likes
Jono,
I think I am headed in the right direction thanks to your help.
I added the code and changed it for my fields but it does not seem to be triggering.
topmostSubform.Page1.FirstName::exit - (JavaScript, client)
if (!(this.isNull) { //if field isn't null
LastName.mandatory = "error";
LicenseType.mandatory = "error";
//etc
}
else { //if field is null
LastName.mandatory = "disabled";
LicenseType.mandatory = "disabled";
//etc
}
Views
Replies
Total Likes
Sorry, had an error in my script the first line should be:
if (!this.isNull) {
or
if (!(this.isNull)) {
Extra bracket or non-closed bracket depending on your preference!
Views
Replies
Total Likes
Thanks again for this answer. It was perfect.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies