Forum Post: RE: Display a model form before saving

  • Thread starter Thread starter Paulh0763
  • Start date Start date
Status
Not open for further replies.
P

Paulh0763

Guest
Don't mean to be a pain but what if I have 5 required fields and I want the diagram to display only the missing ones in a list format? Meaning, have the script loop through what is missing and display only those required fields? Is this possible? Something like this: var checkValues = { "Street Address 1" : "{!streetAddr1}", "Street Address 2" : "{!streetAddr2}", "City" : "{!city}", "State" : "{!state#code}", "ZIP/Postal Code" : "{!zip}", "Phone" : "{!phone}", }; var missingValues = ""; for (var key in checkValues) { var obj = checkValues[key]; if(obj == "") { missingValues += " li " + key + " /li "; } } if(missingValues != "") var dc = ' span class="bold" Before updating the account, the following fields must be set: ul ' + missingValues + ' /ul /span '; var dt = 'Update Account'; showPopWin("../dialog/infoDialog.jsp", 500, 250, null, true, dc, dt); } } This is how I had the script but could not getting it working correctly.

Continue reading...
 
Status
Not open for further replies.
Back
Top