Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Make fields required in expanding table

$
0
0

Hello,

How can I check for required fields in an expanding table?  In my current setup, it only checks the first row to make sure it's filled out, but then allows the remainder to be empty when locking the form.  Setting the two fields (Full Legal Name and Position Type) to "Required" doesn't do the trick, because I need all of the following to take place.  I can't simply lock all fields in the form either, because there are a couple of others and a signature field that should not be locked.  There are other fields in the form that I'm not showing here; that part of my form is working okay.

 

The submitter can click the "plus" and "minus" buttons in the row to add and remove spaces for additional names.

Table.png

 

My script does the following:

  1. Check for all fields required from submitter.  If a field is blank, cancel submit.
  2. Confirm permission to lock all submitter input fields. (If submitter clicks "No", then abort and allow submitter to continue entering data.  If "Yes", continue.)
  3. Save As
  4. Submit file via e-mail

 

Everything works, except for check for blank rows #2 and up if the submitter adds rows. In my "real" Submit button (I'm using a "dummy" and hidden "real" button in order to customize the Javascript on the "real" one) I have the script below:

 

if (UsersRequiringAccess.Table1.RowUserName.FullLegalName.rawValue == null ||  UsersRequiringAccess.Table1.RowUserName.PositionType.EC.rawValue == "") {  statusIncomplete = 1  }

if (statusIncomplete == 1) {
  xfa.host.messageBox("Please complete all fields before submitting","FORM INCOMPLETE",0,0);  javascript_abort();  }


var retFromBox = xfa.host.messageBox("Your request form will be locked, saved and submitted -- continue?","Lock, save and send?",1,2);
if (retFromBox == 3){  //Clicks "No"  javascript_abort();


if (retFromBox == 4)  //Clicks "Yes"  {  Field1.access = "readOnly";  Field2.access = "readOnly";

SubmitReal.event__click.submit.target = "mailto:.....

 

I'm also getting a syntax error on line #6, which for the life of me doesn't make sense.  So, again, I need to check to make sure that if the submitter leaves no empty rows or fields in the table.

I'd greatly appreciate any help.  Thanks!


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>