Skip to main content
Known Participant
January 25, 2018
Answered

Include radio button of group in subject line adobe forms

  • January 25, 2018
  • 1 reply
  • 681 views

I am working on a form that users complete and submit via email using the submit form button.  The submit form button uses a java script to send to the email address as well as dictate the subject line.  The subject line has hard coded data as well as data from a text field on the form that identifies the affected employee - but I would like to identify if the request is for a new hire or a change to a current employee - based on the radio buttons chosen (required fields).

My current javascript in the submit form button is:

this.mailDoc({bUI:true, cTo:"email@server",

cSubject: "Security Equipment Request Form For:" + " " + this.getField("User Name").value})

Works great, but would be perfect if it said "Security Equipment Request Form For "New Hire"/"Change" (user name)

The required radio buttons are a group called "Type" with one being "New Hire" and one being "Change"

This topic has been closed for replies.
Correct answer Thom Parker

Change the export values of the radio buttons to "New Hire" and "Change".

Now modify the email line to this:

cSubject: "Security Equipment Request Form For:" + " " + this.getField("Type").value + " " + this.getField("User Name").value})

1 reply

Thom Parker
Community Expert
Thom ParkerCommunity ExpertCorrect answer
Community Expert
January 25, 2018

Change the export values of the radio buttons to "New Hire" and "Change".

Now modify the email line to this:

cSubject: "Security Equipment Request Form For:" + " " + this.getField("Type").value + " " + this.getField("User Name").value})

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Known Participant
January 25, 2018

THANK YOU!!!!   I was SO close! 

Thom Parker
Community Expert
Community Expert
January 26, 2018

It's always something small

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often