Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Delete Social Security number and date of birth upon submit.

Avatar

Level 2

I have created a fillable form in LiveCycle Deseigner ES (version 8.2) for our Store Managers to use - to fill in new hire information to submit to our Corporate Office.  At the bottom of the form I have 2 buttons - a Print button and a Submit button.  We would like them to fill out the form with all information, including the social security number of the new hire and to use my print button to print the completed form for their records.  That is easy enough.  However, what I am being asked to do with the submit button is kind of complicated.  I am being asked to program the submit button so that it deletes the social security number completely before the send so that we are not e-mailing a completed .pdf form with a social security number on it.  How can I accomplish this?  If it requires inserting programming code on the XML source tab of LiveCycle Deseigner ES, I will need specifics.    Thanks!

2 Replies

Avatar

Former Community Member

It will require code, but you do not add it in teh XML source. In Designer, click on teh submit button. Now we need to activate the Script Editor....under the Window menu make sure Script editor is checked. It will appear between the toolbars on the drawing palette. Now we need to select the language we want to code in, where the code will execute and the event that we want to code. The event will be PreSubmit, the language will be Javascript and the RunAt will be client. Now add this line of code in the editor.

SSN FieldName.rawValue = "";

Substitute the name of the SSN field with the name that you called yours. Here is an image to help you visualize:

Capture.GIF

Avatar

Level 2

Thanks!  Your answer was very helpful and I found it to be 99.9% correct.  However, it ended up that I needed to attach that code to my SSN field and not my Submit button.  So, in my case, this is what it looks like when I click on my SSN field after I added the code:

topmostSubform.Page1.SSN::preSubmit:form - (JavaScript, client)

SSN.rawValue = "";

I did the same thing for my date of birth (DOB) field:

topmostSubform.Page1.DOB::preSubmit:form - (JavaScript, client)

DOB.rawValue = "";

I tested the form after the changes and it worked great.

You are a life saver.  Thanks again!