Submit PDF via email with customized Subject and Message - javascript

Using Adobe Acrobat Pro XI, I am working on a medical form form notifying our medical team of new patients. Upon completion of the form, I am trying to set it up to use a button to submit the saved PDF form and send it to our medical team in an email (we use MS Outlook across the organization). I've found multiple scripts that get me close to what I'm looking for, but I'm trying to accomplish this task with the following parameters:
Email To: "medical_team#outlook.com"
Subject Line: "Patient Notification Form - [LastName, FirstName Rank]"
Attach as: PDF
Body / Message: "Please find the attached Patient Notification Form for [LastName, FirstName Rank] attached."
Form Field Names:
- Last Name: Pull from form field "Patient_Last_Name"
- First Name: Pull from form field "Patient_First_Name"
- Rank: Pull from form field "Patient_Rank"
Any help would be greatly appreciated!

Related

Adobe Acrobat Pro Submit a pdf to a user generated email?

Using Adobe Acrobat Pro
I am filling out a form that will be used by a variety of people, each with their own team lead. I want people to be able to fill out the form, type in the email of their team lead, and then have a submit button that will submit the form to that email.
Does anyone know what javascript I need to write to accomplish this?
I tried the Submit form function of the adobe acrobat button, but it doesn't allow me to customize the Mailto: form.
Edit: I found Javascript that lets users fill in a text entry field that will then be the subject of the body once the users click the submit button. Can someone who is more savvy than I rework this so that the email address is the one based on the user's entry?
Where "MyTextField" is the earlier user text field for the subject:
var customSubject = this.getField("MyTextField").value;
var mailtoUrl = "mailto:studiosupport#qoppa.com?subject=" + customSubject;
this.submitForm({
cURL: mailtoUrl, bPDF:true
});
I'm trying to learn a bit about code as I look through this. Why would this workaround not work?
var customSubject = Tomato;
var mailtoUrl = "mailto:this.getField("MyTextField").value?subject=" + customSubject;
this.submitForm({
cURL: mailtoUrl, bPDF:true
});

Registration Form output to be displayed in the form of a table in the same page using HTML, JS and jQuery(if needed)

I am trying to create a registration form with the fields First Name, Last Name, Email, Password, Date of Birth(mm/dd/yyyy).
And then I want to display the data entered in the text box below the form in same page. Can someone help me with the code and a little explanation? And can you please use HTML and JAVASCRIPT.
And for text editor I am using JetBrains WebStorm tool.
make a <div> as show data and use this in your script document.getElementById('data').innerHTML = res;

Interact with web page using javascript injection in a Safari Extension

I'm very new to developing Safari Extensions and I don't know any java, css or html.
I've been searching round the web for a way to interact with a website using javascript injection. Specifically, I wish to fill out two forms; a username and a password and then press the 'login' button.
I've learned that I need to use something like document.getElementById() and .click and .value, but I really don't know how to connect the dots.
Any help is much appreciated!
Kind regards, Tokke
I will assume that when you say two forms, username and password you mean two text inputs, and then submit the form.
What you should do, is:
Select each text input and change its value attribute.
Submit the form
Could be done with the following code, assuming that your form has an id="my-form", your username input has id="username" and your password input has id="password".
document.getElementById("username").value = "myusername"; // Select and fill username input
document.getElementById("password").value = "mypassword"; // Select and fill password input
document.getElementById("my-form").submit(); // Submit the form

How to force Firefox and others to remember my new password?

I'm in the same situation as this guy: Triggering the Change Saved Password dialog in firefox
I have a modal window that appears to let the user to change his password. When submitting the form (it's a POST), Firefox doesn't ask to change the password in its database.
I tried several things:
A dynamic form (created with JavaScript) with all fields with autocomplete="on", and with two fields named "current-password" and "new-password"
A dynamic form (created with JavaScript) with all fields with autocomplete="on", and with two fields named "current-password" and "password"
A dynamic form (created with JavaScript) with all fields with autocomplete="on", and with three fields named "username", "current-password" and "password"
A non-dynamic form with all fields with autocomplete="on", and with three fields named "username", "current-password" and "password" ==> in that case Firefox shows me my username in the "username" field and my current password in the field "current-password"
I also tried to call my two fields "password" and "new-password"
I tried to use the JavaScript submit() command, then I tried a SUBMIT input button in my form. The form has also the autocomplete="on".
But Firefox never asks me if I want to update my saved password... Any ideas?
Check that you haven't set a block exception.
Tools > Options > Security: Passwords: Exceptions
You can also check if there are any entries for that site or entries with an empty name listed in the password manager.
Tools > Options > Security: Passwords: "Saved Passwords" > "Show Passwords"
If you click "Never" then you create an exception that needs to be removed.
Normally you simple enter the new password, then firefox asks me if I want to store the new password.
Try giving the form and form fields the same name and properties.

Removing spry validation on an input in javascript

I want to have a form in my checkout page that has an input for billing address and I have also a list of billing address. If the user has added any billing address from their account, it will listed on the checkout. Now if the user is on the checkout page then he/she will have two options, select a billing address from the list or add a new billing address. The "add" form has had spry validation added to it.
My problem was that if the user selects a billing address from the list the spry validation still occurs on the billing address form and the user can't submit the form. What I'd like to have happen is if the user clicks on the link "add the new billing", then the spry validations object will be created and the form is displayed and when the user clicks on the cancel button then the object is destroyed.
I have created an object when the user clicks on the link for the add form. Both the object & validation works perfectly.
UserAddressBookFullNameValid = new Spry.Widget.ValidationTextField("UserAddressBookFullNameValid", "none", {validateOn:["blur"]});
How to I destroy the object or remove the validation when the user clicks on the cancel button. I have tried some ways but it won't work. Examples:
delete UserAddressBookFullNameValid;
UserAddressBookFullNameValid = null;
So can anyone help me to do this or give me some another way?
Thanks
To have this work, make sure UserAddressBookFullNameValid defined in your javascript.
var UserAddressBookFullNameValid;
Create the spry validation for the field as you do now. In the code for the cancel button put:
if (UserAddressBookFullNameValid != undefined) {
UserAddressBookFullNameValid.reset(); //Resets any validation css on the form
//(may not be necessary if hiding the inputs
UserAddressBookFullNameValid.destroy();
UserAddressBookFullNameValid= null;
}
I had a similar problem except I needed my field validated only if a checkbox was checked & it now works for me using this code.

Categories

Resources