PDF Form: Multiple Choice sheet that displays a percentage based on answers provided

Hello,
Im trying to create a form that has 4 multiple choice questions, the answers to each being the values 0,1,2,3,4, 5 or N/A.
Once answers are given, I'd like the percentage to appear on the form.
I can't figure out how to do this, as the total fluctuates depending on if the response to one or more questions is "N/A".
I.e. if the answers were as follows: 4,4,4,4, the percentage would be 80% (16/20).
However, if the answers were: 4,4,4,N/A, the percentage would also be 80% (12/15) and NOT 60% (12/20).
I figure its a javascript thing - but alas I do not know Java.
Help Please!

So you want to compute the percentage of the non-"N/A" selections using the count of selected items * 5 as the denominator and then use that value to divide the sum of the values for the non-"N/A" selections.
Has a default checked value been selected.
Since the averaging is not just computation of the mean based on the item count, you to create a custom JavaScript calculation.
var aNames = new Array("Radio Button.0", "Radio Button.1", "Radio Button.2", "Radio Button.3"); // array of field names
var aValues = new Array();
var sum = 0;
var count = 0;
var oField;
event.value = "";
for(i = 0; i < aNames.length; i++) {
// get values of fields into array;
oField = this.getField(aNames[i]);
if(oField ==  null) app.alert("Error getting " + aNames[i] + " field!", 0, 1);
else aValues[aValues.length] = oField.value;
if(aValues.length != 0) {
// sum the non-N/A vlaues in the array;
for(i = 0; i < aValues.length; i++) {
if(String(aValues[i]).toUpperCase() != "N/A") {
sum += Number(aValues[i]); // sum the non-N/A values;
count++; // count the non-N/a values;
// compute average if count not zero;
if(count != 0) event.value = sum / (count * 5);

Similar Messages

  • How to stop someone from filling out pdf form multiple times?

    My customers order my service by down loading a .pdf form. They then fill out the form and submit the form to my email. How do I stop a customer from submitting the form multiple times. I would like for the customer to submit the form only once filled out. If I need more info I could follow up to their order manually via email. Thanks for your help!

    One of the main reasons why you have a customer posting multiple submits would be because for some reason he/she doesn't know the first one was successful.
    Add a property your form to record whether or not a valid submit has already happened. Use script to set that property on submit. Check each time the submit operation is fired to see if the property is set. If it is display an error dialog and stop the submit from occurring.
    If someone wants to open multiple copies of your form and fill it out and send it to you, well there's nothing you can do about that.

  • How can we use a pdf form multiple times for different people (students)?

    Our school created a pdf form of our report card but we are not able to "save as" the forms for use by multiple teachers for multiple students. Please advise.

    Just use Adobe Reader XI.  Adobe Reader XI allows for forms data saving but it does NOT allow for locking down that data.

  • PDF Forms filled out don't display on Ipad2

    I use Dropbox to organize many of my files.  Some of those files are PDF forms that have been filled out.  They display correctly on my PC and my android phone.  However, they show up as blank forms on my Ipad2.  Why?  I have tried GoodReader, Dropbox, PDFReader -- they show the PDF form, but none of the information that has been added to the form.  It seems like this is an Ipad limitation.  Any help or solutions would be great.
    Regards
    Bruce

    Obviously an old OP, but I stumbled on this problem myself recently.  As of Oct 2012 ibooks, Dropbox, and most other pdf viewers don't seem to hande filled out Adobe forms.
    The good news is that the current version of the Adobe Reader app does (and its free!).
    I was pretty sad after buying FileBrowser and DropbBox Pro only to to discover that forms were showing up blank -- the Adobe Reader app is a life saver

  • How to Get XML from the PDF form generated using Designer that is stored in LC

    We have a Requirement of Generating reports on what a PDF form is comprised of? It is easy for us to scan / parse the XML format of the PDF form and get all the relavent Info we need. We are able to see the XML format of the PDF form when we open up the Form in Designer.
    But we are trying to run this report in a Batch Mode for many PDF files. I need to know how to get a XML format of the PDF file that is stored in LC that was developed using Designer. Once we are able to get the XML of the PDF form it is just a scan / parse to get the relavent data.
    Can some one tell me how to get the XML format of a PDF file stored in the LC?

    If I place the PDF form on the LC server - Can you let  me know of the tools you are referring to get XML design from the PDF form?
    Is it through a Process Orchestration I need to run the PDF through to get a XML design out of it?
    I am fine in storing the PDF in the LC server? How will I get the XML design (XML) from this PDF on the server?

  • Seeking Pdf form help - javascript formula to auto-populate fields based on data from other fields.

    Hi there, I am new to PDF form work, and am wondering if someone could help me with a javascript formula.
    I want to auto-populate the EXPIRYDATE field, as the same date as the entered AUTHORIZATIONDATE field, but 4 years later.
    So, I want to be able to enter 11/14/2014 in the AUTHORIZATIONDATE date, and have 11/14/2018 auto populate in the EXPIRYDATE field.
    Seems simple I know, but I've messed around quite a bit and can't seem to make it work. Is this possible??
    Any help would be very much appreciated!!

    And what have you done?
    This can only be done with custom JavaScript programing.
    The value of date type fields are text field and not numeric data. The first task is to convert the dates to a number on some type of number sequence that is a mapping to dates.
    Have you looked at the Acrobat JavaScript API Reference, the MDN JavaScript reference?
    I would use the Acrobat JavaScript util.scand to covert the date string to the number of milliseconds from January 1, 1970 midnight. and then use the getFullYear method of the date object for the year value and add 4 years to that value and then use the setFullYear method to set the year for the date object. Now you can use the util.printd method to format the date object as a date string with a specific format.
    // get the date value, format of date string and years to add;
    var cDate = "11/14/2014"; // date value;
    var cFormat = "mm/dd/yyyy"; // date format;
    var nYears = 4; // years to add;
    // convert date string to date object;
    var oDate = util.scand(cFormat, cDate);
    if(oDate == null) {
    app.alert("Error converting " + cDate + " using format " + cFormat, 0, 1);
    // add years to date object;
    oDate.setFullYear(oDate.getFullYear() + nYears);
    // display result;
    var cExpireyDate = util.printd(cFormat, oDate);
    app.alert("Authorization Date: " + cDate + "." +
    "\nExpire Date: " + cExpireyDate, 3, 0);

  • Flattened PDF Form and Barcode not displaying

    I see there are a lot of discussions that are not answered in this forum, so I am guessing this will go unanswered as well.  But I am looking for a solution for the issue in the subject. I have a simple PDF form built in LiveCycle that I am populating with Coldfusion. Once the form is populated I then flatten the form. The barcode appears up to the flattening point which is when it disappears. The characters that populated the barcode field ARE displaying but the image is not.
    Is there a solution?

    How are you flattening the forms?  I'm assuming PDFg or Output?
    Also, be sure your barcode looks something like this:
    <field name="PDF417BarCode1" y="50.8mm" w="66.7mm" h="25.4mm" access="readOnly">
    <
    ui><
    barcode type="pdf417" dataLength="10" moduleWidth="0.0133in" moduleHeight="0.02661in" errorCorrectionLevel="5"/></
    ui><
    value><
    text>1234567890</text></
    value></
    field>
    and not...
    <field name="PaperFormsBarcode1" w="82.55mm" h="44.45mm" access="readOnly"><
    ui><
    barcode type="pdf417" moduleWidth="0.338mm" moduleHeight="0.676mm" errorCorrectionLevel="5"> 
    <?templateDesigner decodeMethod 2?>
     <?templateDesigner delimiter '\t'?></barcode></
    ui><
    calculate><
    script contentType="application/x-javascript">
    ...completely void of script and the value in only the <text> element.

  • Highlighting text box for multiple choice presentation.

    I'm making a multiple choice presentation and need help highlighting the correct answers.
    I'm using Keynote v5.3 and here is the format of my slides:
    Text box - Question
    Text box - (A) Answer A
    Text box - (B) Answer B
    Text box - (C) Answer C
    Text box - (D) Answer D
    When I click to advance, the desired effect I'd like is for the correct answer to turn red in order to let the class know that it's the correct answer.
    I looked on the Build Inspector tool but the only Effects that appear in the Action section are Move, Opacity, Rotate and Scale. None which I don't want.
    Is there a way to animate the correct answer/text box to change color?
    Please help. Thanks!

    builds only work in  linear order ( 1, then 2, then 3,  then 4 ) they don't run in a random access selection,
    ( 4, 1, 2, 3 ) which is what would be required in the method you describe.
    the  way to do this is to use hyperlinks from the first slide to four other slides
    on slide 1:
    type the question and  the multiple choice statements
    draw a shape beside each statement and use this as a hyperlink button to the  respective slide number
    select each shape in turn:
    inspector > hyperlink > enable hyperlink > link to slide and select the respective slide number
    when you click on   button A, it will display the the responce to choice d
    by the way, viewers have been taught that colours have  certain associations ( country dependant of course)
    such as red for danger so
    the traditional colour to use for a correct answer is GREEN
    the traditional colour to use for an incorrect answer is RED

  • PDF forms populating Access DB and vice/versa

    I have a PDF from that I published to Acrobat.com There are fields to be filled out. Problems:
    1. How can I set the fields to populate into an existing MS Access DB once submitted results back to me?
    2. How can the form populate upon a certain chouice criteria?
    Scenerio: Form is a log file for patients seen, including name, date, room#, diagnosis codes, testing, medications, f/u. The same fields exist in MS Access but distributed among 3 tables (linked). In the PDF form I have created a New Data Connection (OLEDB), Connection string (Provider for ODBC drivers), In the Data View I see my fields from access - so for each input Binding it points to the field (i.e.: for patient name - $record.Patient.Last_Name).
    But here is the rub:
    1. When the first patient filed is filled, all subsequent patient names are filled with same name (and they keep just replaceing the other inputs).
    2. I cannot seem to create a date calender, or have the current date default (taken from the computer time stamp).
    3. I can not seem to calculate the follow/up (it's 4 weeks) from the input of the date.
    4. When selecting a facility, how do I populate the fields with current patient names and previous Diagnosis (if at all possible).
    5. When I created the data connection, the fill in spaces become obscured and my drop down box for facility choice stops working.
    I know this is big, but any advice and help is greatly appreciated in advance. I have also attached the PDF form for analysis. Please not that there are two, one is the original prior to Life Cycle modification and the other is with the DB linking attempt.
    Thanks
    Shai

    Hi Paul,
    Thanks for the reply and help. I am uploading the MS Access DB (2007). Another caveat, when I chose to use the creat new connection and then chose the build - Microsoft Office 12.0 Access Databse Engine OLE DB Provider, I am not able to link into the database at all. I double checked the location and everything. I do not have any user name or password set-up and chose to leave it blank but get his error:
    Test connection failed because of an error in initializing provider. Could not find file 'C:\User\........'
    Since I am new at this, please feel free to change any structure of the form as needed - as long as the end result will work
    The set-up sounds quite easy and straight forward, but guess its a bit more complicated than I thought. I even have the book: Adobe Acrobat 9.0 in a class room - but no help there either. I am familiar with some Javascripting, so your explanations hopefully will not be over me head.
    Thanks again for your dedication and help
    regards
    Shai
    Message was edited by: Shailevit - I am not able to upload the Access database - file not allowed. it's in the .accdb format. Is there a different format that is accepted to be uploaded ? (PS: Zip doesn't seem to work either) - Thanks

  • Multiple Choice Question Issues

    I am embedding a quiz within my presentation with individual
    question slides interspersed throughout the presentation. These
    questions are pulled from a couple of different question pools. I
    want to use a multiple choice question that branches to different
    parts of the presentation depending on the correct or incorrect
    answer. If the user answers the question incorrectly, I send them
    to the next slide which has two click boxes. On this slide, they
    can either click one box to move back in the presentation and
    review the material or click another box to move them forward to
    another multiple choice question. If they go back and review the
    information, they would eventually return to the same multiple
    choice question to try it again. (This is the desired navigation,
    anyway.)
    What actually happens is that when the user goes back to
    review the information and then finally returns to the question,
    the question has not been reset and still shows the incorrect
    answer marked with no way to clear it.
    I have used this same navigation on a drag-and-drop type
    question and it works fine. All the settings for the
    multiple-choice questions are set the same as in the drag-and-drop
    question.
    Any help in making this work correctly would be greatly
    appreciated.

    I can't see where that error might arise except possibly for a case where an AS2 radio is used since it appears they don't have a group property, but an AS3 radio button does.  Check to be sure that your Flash Publish Settings are set to use AS3.  AS3 errors normally have error numbers which also makes the error you quoted ring of an AS2 scenario.
    Here's a link to the file I made based on your code that works fine and doesn't display the errors you mention.  It is a CS3 file.
    http://www.nedwebs.com/Flash/AS3_Radios.fla

  • How do I save the whole pdf form and send through a mailto?

    I have a pdf form created in LiveCycle that needs to be sent through email as a pdf attachment.

    Hi,
    You have the choice between xml or pdf, in later versions of designer you can choose with a dropdown on the email button object palette, the "Submit As";
    In earlier version you had to edit the XML Source and change the format from xml to pdf (or vice-versa);
    Regards
    Bruce

  • Acrobat 7.0 Pro on Vista freezes when PDF from Multiple

    I try to create a PDF from multiple files and Acrobat just sits there looking stupid. I've checked for updates - Fully updated. It's from my CS2 Premium Professional edition. I have it installed on a Dell e1705 with Vista Home. Dual Processor, but still a 32 bit system. 2GB of ram and a 256 memory card.
    I look at the Task manager and the program is using about 22mb of memory. After I select the create PDF form multiple files the program stops like it is about to do something. Vista doesn't register the program as not responding so it's doing something. The CPU usage is at about 50% and stays that way for at least 15 minutes. I just got tired of waiting and closed it in the task manager.
    How do I fix this?

    It is interesting that you say it is an Adobe bug (or at least that is the implication I got). Part of the problem with VISTA has been that there are a lot of programs that do not work. That is also why many businesses and individuals are still using XP and refused to upgrade. VISTA has a service pack out, but I hear it still has lots of problem. MS has fixed VISTA where there own software was concerned, such as putting the help system back in that they had removed. I am not trying to say that VISTA is not the way to go, but that the blame for things not working should not be put on other software developers.
    The $1500 must be for CS, since an upgrade to AA8 from AA7 is only $159. In today's market, AA7 is actually an old man with AA8 being out for quite a while. Six months ago you could still get XP Pro for about $190. I understand it is now almost $800, but I really don't track the prices. I am getting a new machine with VISTA on it in a week or two and plan to look at it a bit (called give it a chance). However, I fully expect to remove VISTA and install XP Pro. To me, that cost is a lot better than upgrading all of my software because of the changes in Windows.
    So which system has the bug, Adobe or VISTA. I think you will find a lot of folks who say it is VISTA (that is not to say that Adobe doesn't have some issues also). Hope you get your system working satisfactorily.

  • Win7 64-bit PDF Preview works- except with PDF Forms?

    I have Win7 64-bit with Adobe Acrobat X Standard installed. I receive PDFs as attachments in Outlook 2010, and for the most part, the PDF preview works fine. Downloaded PDFs that I have in a folder with the Preview Pane work fine as well. However with PDF forms, which have cells that you can manually fill in, i.e. name, hire date, etc. I receive an error "Please wait, If this message is not eventually replaced by the proper contents of the document, your PDF viewer may not be able to display this type of document." This happens in both Outlook 2010, and the Windows Explorer preview pane panel. The attached website does not fix my issue as the registry key is correct. Any ideas? Thanks! http://www.pretentiousname.com/adobe_pdf_x64_fix/#downl

    Hello NI_LV_82_User,
    The DIAdem PDF output is not compatible with Windows 7 (DIAdem 11.1 was released in July 2009, Windows 7 was made available in October 2009). The DIAdem R&D department is currently working on a fix to add this functionality under Windows 7. We are working to provide a solution as soon as possible and will make the release of the Service Pack known here on the forum as soon as it is available.
    Message Edited by Otmar on 11-30-2009 02:13 PM
    Otmar D. Foehner
    Business Development Manager
    DIAdem and Test Data Management
    National Instruments
    Austin, TX - USA
    "For an optimist the glass is half full, for a pessimist it's half empty, and for an engineer is twice bigger than necessary."

  • Question about Multiple Choice Quiz

    I have multiple choice quiz that I'd like make more complex. The quiz is based on a movie clip with a series of questions on different frames and the same set of answer buttons on each frame (no keyframes on the answer button layer). The user clicks a button to go from one question to the next. There’s a scoring mechanism that displays the number of correct answers (score), the total number of answers clicked (right or wrong), and the percentage of right answers.
    For each question, only the first answer counts toward the score. If you click correctly the first time, a point is added to the score and to the total. If you click incorrectly the first time, a point is added to the total only. After you give the first answer, right or wrong, you can still click on all the answers to see which answer was correct; the correct answer button changes in appearance and the correct sound cue plays but no point is added to the score or total. If you click on a wrong answer after you’ve given the first answer, the incorrect sound cue plays but no point is added to the total. In other words, you can’t help or hurt your score after clicking on the first answer, but you can determine which answer was correct.
    This all works fine.
    But now I want to make a similar exercise that has TWO questions on each frame. The answers both come from the same set of answer buttons. The question is how to preserve the “only the first click counts” mechanism for each of the two answers, since clicking on the answer to the first question will mark the frame as “answer has been given” and prevent any further scoring. There needs to be a point given for each correct answer on the frame.
    Here’s the code from an answer button in the existing quiz. How would I modify this to allow for two answers per frame?
    on (press) {
                    /* This code executes whether this is the first click on the answer button or a subsequent click. If the answer is correct (if this is frame 1 or 3), the correct sound cue plays and the answer button changes its appearance, and if the answer is incorrect (if this is any other frame), the incorrect sound cue plays */
                    if (_currentframe == 1){
                            _parent.snd_obj.playsound("correct", "cue1");
                            answer1_mc.gotoAndStop(2);
                    }else if (_currentframe == 3){
                            _parent.snd_obj.playsound("correct", "cue1");
                            answer1_mc.gotoAndStop(2);
                    }else{
                            _parent.snd_obj.playsound("incorrect", "cue2");
                    /* This code executes only if this is the first click on the answer button. It checks to see if an answer has been clicked in this frame, and if not, it marks the answer as given (so this code will be executed only once) and then adds one point to the total, one point to the score for correct answers, and re-calculates the percentage */
                    if (!_parent.answerGiven[_currentframe]) {
                            _parent.answerGiven[_currentframe] = true;
                            _parent.total = _parent.total + 1;
                            _parent.percent = Math.round((_parent.score / _parent.total) * 100);
                           if (_currentframe == 1){
                                   answer1_mc.gotoAndStop(2);
                                   _parent.score = _parent.score + 1;
                                   _parent.percent = Math.round((_parent.score / _parent.total) * 100);
                          }else if (_currentframe == 3){
                               answer1_mc.gotoAndStop(2);
                               _parent.score = _parent.score + 1;
                               _parent.percent = Math.round((_parent.score / _parent.total) * 100);
                           }else{
                               _parent.snd_obj.playsound("incorrect", "cue2");

    This is indeed a very random issue. I have seen this in earlier versions of Captivate as well. I always create my template files from the blank theme, so I don't think it is specific to the theme.
    As for solutions, sometimes changing the quality of slide to high worked, other times just reopening Captivate worked. Here are some of the solutions I have found on these forums:
    1.  Create one more answer than I need (ie for a 4 answer question, create 5 answers) and then delete answer B.
    2.  Uninstalled/reinstalled my Captivate 6 software
    Sreekanth

  • Digital Signature Interactive PDF form

    Hi
    I am Trying to make an Interactive PDF form with a functionality to Display and hide Specific Fields Using a Button
    Is It possible to Digitally Sign such a PDF
    If it is
    Will the signature be removed once i Activate the Interactive Functionality from the form of Display\Hide a field  ?

    To further elaborate:
    There is some general Java documentation in the SAP library on digitally signing a document with SSF:-
    http://help.sap.com/saphelp_nw04/helpdata/en/a4/d0201854fb6a4cb9545892b49d4851/content.htm
    Questions though:
    (1) If I sign with the SSF classes will this then prevent the popup "Uncertified document" appearing in ACROBAT reader? The PDFs that the UI interactive form produces are not pure XML streams are they? As far as I can ascertain SSF is not suitable for signing PDFs!
    (2) At which event would one sign the pdfSource context node for an interactive form created in the web dynpro environment? At method WDoInit of the PDF view the pdfSource context node is still null.
    Thanks again,
    Jonathan

Maybe you are looking for

  • Anyway to have JDeveloper dynamically load BC4J components in memory?

    We are dealing with a large BC4J based application that contains large amount of application modules. So far, 300 application modules and total 4000 BC4J objects have been created. The size of the application still keeps growing daily... may up to tw

  • You are not a receiver of the work item in ESS Leave

    Hi, We are using standard ESS leave application in our portal, where employee can raise leave and his manager can approve/reject his leave. But I want in case manager rejects the leave, the rejected leave should not come into MSS UWL of employee, we

  • How to open QuickTime files in the Footage window on Mac

    Using CS4 on the Mac when I double click a QuickTime HDV video clip in the project pannel it opens it in a separate window how can I open it in the Footage window? Thx Kevin

  • ImageUltra Builder 5 - Can't get new computers to connect to repository

    Greetings.  I've recently (finally) upgraded from IUB 3 to IUB 5 and while our older PC's connect to the upgraded repository and image just fine, I can't get newer PC's to even grab an IP in the WinPE environment after booting off a disc (for network

  • DPI vs HiDPI on battery life

    I know this may greatly vary from usage to usage due to how much/frequent scaling takes place in HiDPI depending on the applications used but I would like to hear your personal accounts in this regard. Please kindly state: how much battery life you a