Need js for alert @ Submit button when Radio1 = white YES but left Radio2 by mistake

My form (Acrobat X) has a submit with javascript button that checks to make sure that all questions are answered. Works fine for all the questions except for the situation where if radio 1 = YES, then the button radio 2 must be filled.  I can operate separately for each question, but may not know how to check the (YES) radio1 AND radio2 (empty).

You can provide any help will be greatly appreciated!

Here's a sample of what I think, it is the relevant code (I'm a total newbie, BTW):

var errSec2 = «»

var errMsg = «»

var tmpVar = «»

Check if r_radio1 the field so full

tmpVar = this.getField ("r_radio1");

If (tmpVar.value! == 'YES' & & tmpVar.value! == 'NO') errSec2 += ""--you don't have to answer this question - if you answer NO, you must meet the following question\r\n ";"

Check if something was left out of Section II if so insert

the title and add it to the error message

If (errSec2! = "") errMsg = errMsg + "\r\nSECTION II is incomplete. \r\n"+ errSec2;

Check to see if it is has had not filled all the fields

Alert to fix the errors found or default print pop

If (errMsg! = "") {}

App.Alert ({}

CMSG: errMsg

CTitre: "Validation error! ({' Required entry for '});

}

else {}

This.Print (true);

}

Yes, I understand... Here's the code you can use:

{If (this.getField("RADIO1").value == 'YES' & {this.getField("RADIO2").value == "Off")}

App.Alert ("Error message here");

} else {}

do something

This.Print (true);

}

Happy to hear my messages will be useful!

Tags: Acrobat

Similar Questions

  • Hide the "submit" button when there is nothing to report

    Hello

    I have a simple command with a 'running total' good quantities ordered at the top of the form, (FormCalc) calculated as follows:

    the sum of $ = (Products.PRODUCT_GROUPS. DATA[*]. PRODUCTS. DATA[*]. Quantity)

    If this amount is zero (that is, nothing has been ordered) so I want to ban the form submitted by e-mail. I thought that the best way to achieve this would be to hide the submit button when this field is zero and show when > 0.

    I tried adding this code for the same event in this field to calculate:

    If ($ > 0) then

    Button1.presence = "visible".

    on the other

    Button1.presence = "hidden".

    endif

    but no go.

    Sorry if it's real simple, but I would appreciate the help!

    Thank you.

    When, in the code window, you will see that it says something about Ctrl + click for the SOM expression. So if in the event code for an item, you can press CTRL, then click on another point and it will insert the correct reference in your code. We must ensure that emphasis is placed in your code when you do and the mouse cursor will turn into a broad V.

    You can do a right click in the code window and select check the syntax of the Script to see if there are problems.

    When you view the form in preview, Ctrl + J opens the JavaScript debugger. It may need a config first in Acrobat. It has been a while since I put that up. Instead of making app.alert, you can do console.println and it will write in the JavaScript console. Occasionally, you may need to debug something dealing with the development and the app.alert itself affect the focus.

    Have you thought about putting your code preSubmit event and displaying a message that nothing has been entered? Also don't xfa.event.cancelAction = true

  • Delete record behavior does not wait for the "submit" button

    I have master / detail pages as a whole.  Of all the detail, there are links to delete or update a record.  When I click the link to delete the folder, it goes to the confirmation page with the correct record.  Now, when I add the behavior delete record server and a button "submit", it is what is happening.  As soon as I click on the link to access the Delete Confirm page, deletes the record and the page redirects to the page that I put in the server behavior.  It does not display the confirmation page and does not wait for me to hit the button confirm.  The page runs and removes the page from the database.

    How can I get to wait until I hit the submit button?

    You must surround your request deletion with an "If" statement seeking a confirmation variable, then when the user clicks the confirmation link, you can pass the necessary variable and the ID of the record that the delete request is pregnant.

    As an alternative, you can use a JS alert fuction to ask if they are sure they want to delete the folder, and then delet allwo runs after confirmation to the user. To do this, you can use code like this...


    onclick = "return ('are you SURE you want to DELETE this record? confirm")">

    --
    Lawrence * Adobe Community Expert *.
    www.Cartweaver.com
    All Shopping Cart Application for
    Dreamweaver, available in ASP, PHP and CF
    www.twitter.com/LawrenceCramer

  • Satellite M35 S359 - need tool for 3 hard buttons

    Computer portable satellite M35 S359. I had to install XP from normal Microsoft disk because my recovery disk Toshiba product 'Bad Machine' error when I tried to do my laptop. You can read about my efforts here - feel free to suggest solutions please.

    In any case, I tried to install the Toshiba drivers after installing XP vanilla but I can't figure out how to get the 3 material on the left side buttons (used to bring up the Console, browser, Mail client - or any other program). I think I installed all the drivers that I really need, but this one has escarped me.

    The disk? Alternatively, download?

    I think you mean Toshiba control buttons.
    This seems to be a Toshiba model we.
    This is why I recommend to visit the page of the Toshiba driver we and to download this driver/tool.

    Good bye

  • Why, when I clicked on the link to install, need me for Optimum connection. When I've got Verizon Fios, not Optimum more?

    During the installation of Firefox to my Android version 4.1.2 since my office by clicking the link sent to my phone, Firefox, I am sent to the sign of the Optimum in the page; the problem is I have more Optimum service, I have Verizon Fios triple play, how do I finish this installation of Firefox on my phone and what I was directed to the Optimum sign in page? Please advise me what I have to do; Thank you!

    This foolish. You can visit https://play.google.com on your desktop and search for Firefox here? You should be able to install it on your phone on the desktop site.

  • Satellite A30 - need tool for CD control buttons

    Where can I find the drivers to re - install the CD controls on the front of my A30

    Hello

    Generally all drivers required, you should find the tools and Utilities CD delivered.
    Please check the contents of this cd.

    Good bye

  • Cannot change the "submit" button

    I need to update the Submit button that is automatically generated with a text for validation input area and when I double click on it, nothing happens.  I also tried a right click and go to properties, but once again, nothing happens.  I would be able to change the button submit, as I would any button I created?  I've seen other threads on the forum where it was a suggested approach, but I was not able to Captivate 4.  Any help would be greatly appreciated.

    Hello

    Almost any object in Captivate is able to become corrupted for a variety of different reasons.

    You can find that you must re - insert a box of text of the entry (TEB) to be able to edit the button. Or, you may need to reset the settings of Captivate file. Before trying the settings file, I will try to create a blank slide. Insert a TEB there and see if you are able to edit the button.

    Your project is important? Slides how do you have?

    See you soon... Rick

    Useful and practical links

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcerStone blog

    Captivate eBooks

  • Next and submit buttons - question slides

    Hi all

    I see some problems using with the following buttons on question slides provided with Adobe Captivate 6.0, and send it.

    Desired behavior Actual behavior (out of the Box)

    Entering the slide

    (Behavior at the entrance of the cylinder head is OK)

    • Next button is disabled (grayed out)
    • Introduce the button is enabled
    • "Back" button is disabled

    (The same as the desired behavior)

    • Next button is disabled (grayed out)
    • Introduce the button is enabled
    • "Back" button is disabled
    On the presentation of a correct answer
    • Next button is active
    • Introduce the button is disabled (grayed out)
    • "Back" button is enabled
    • The user should click on 'Next' to continue, or click 'Back' to return to the previous slide.
    • Next button is disabled (greyed out) [ISSUE 1]
    • Submit button is activated (standard color) [issue 2]
    • "Back" button is enabled
    • The user must "click anywhere" to move forward (full page of hand cursorover). This means, if the user tries to click on return they will go to the Next is not the previous slide
    . [Issue 3]On revisiting a question slide (screening)
    • Next button is enabled
    • Introduce the button is disabled (grayed) or invisible
    • "Back" button is enabled
    • The user should click on 'Next' to continue, or click 'Back' to return to the previous slide.
    • Next button is enabled
    • Submit button is activated (standard color)-, but does nothing to click [issue 4]
    • "Back" button is enabled
    • The user should click on 'Next' to continue, or click 'Back' if they wish to return to the previous slide.
    On revisiting a question (for review) slide
    • Next button is enabled
    • Button "submit" is disabled (grayed) or invisible
    • "Back" button is enabled
    • The user should click on 'Next' to continue, or click 'Back' to return to the previous slide.
    • 'Back' button on questions 1 to be disabled or invisible or take the user back in the contents page.
    • Next button is enabled
    • Introduce the button is disabled (grayed) or invisible
    • "Back" button is enabled
    • The user should click on 'Next' to continue, or click 'Back' to return to the previous slide.
    • The 'back button ' on Question 1 is activated and directs the user to the previous content that is confused page. [issue 5]

    Issues related to the:

    1. Are there settings that are the origin of this undesirable behaviour?
    2. Or, is it possible to bypass them? It seems a lot of work to have to rebuild the behavior of quiz!
      1. Problem 1: I could create a custom button 'Next', but I can't see any sort of hook in the submission process to trigger it to be enabled / disabled.
      2. Issues 2 and 4: I could create a custom of 'Submit' button but I don't see what measures to trigger to submit the quiz question.
      3. Problem 3: I do not see boxes click to remove or settings to change, to stop the behavior "click anywhere.
      4. Problem 5: I worked around this by creating my own back for Question 1 only button and hide when they review the quiz.

    Any suggestion would be great!

    Thank you

    Sarah.

    Hi Lilybiri

    Thanks for the links to your blog, as always very useful!

    I understand the hesitation when seeing convoluted questions on this forum, but I encourage you and others to try to remedy. Otherwise, the forum is pretty useless if it only meets the "simple" questions I tried to unzip the problem so that the expected and actual results were clear.

    I have now overcome problems 1, 2, 3 and 4 as follows:

    • Make the button submit transparent and placed a SmartShape resembling to the button send behind it.
    • Removed the success message, so that the action on the success is called immediately by clicking on Submit
    • Call a tip for the successful event Action. This action:
      • Displays the revision message (success)
      • Hide the submit button
      • Jumps to the next slide and then return to the current slide (this ensures that the buttons next and previous are enabled correctly)
      • Calls a Javascript function to pause the slide.
    • Apply the same to all my slides in question... * sigh *.

    I had already worked around 5 problem according to my original post.

    Again, I want to express some frustration that there are so many workarounds to get training to watch 100%. For example, in one of your tutorials there is a transparent button and once I knew how the workaround has been applied, I put my mouse over it the space where the button was and saw the hand icon. While if you think that users don't notice, I assure you that when the courses are distributed to a few hundred people these things don't go unnoticed! The effort to build workarounds is worsened by having restrictions on question slides that do not apply to other slides, which for example not being able to add a button and having to use a SmartShape (which does not reuse the button styles), etc. That means trying several solutions workaround until you can find one where all the workaround steps are feasible and you can get a perfect result.

    In any case, I'll mark this message as answered and call it a day (I have another question about styling SmartShapes used as buttons but post it separately) =)

    Thank you

    Sarah.

  • Dynamicaly change the text of the submit button?

    Is there a way to do this based on what screen you are on inside web determinations?, I tried editing messages.en.properties and using an attribute % textSubmitButton % instead of submit substitute and who attribute to the 'test' in the modules, but the submit button displayed % textSubmitButton %, is there another way to do this?

    You can override the default display text for the submit button by subscribing to the OnApplyTemplatesEvent and change the value of the property 'submit-button-text' in display based on the current screen returned.

  • I made a form for my clients, I did this form with a button "submit" button, the button will save the form and send it, I did the URL to go to a different (different to mine) e-mail address but when I distribute the form and it is complete

    I made a form for my clients, I did this form with a button "submit" button, the button Save the form and send it, I did the URL to go to a different (different to mine) e-mail address but when I distribute the form and it is supplemented by my clients it send to my email address not the URL how to change this.

    No matter how you have configured the Send button when you use the feature distribute the form. There are some e-mail address is in your identity preferences (Edit > preferences > identity) and use it. If you can change the email address it or not to use distribute the form and the button send the value you want.

    One thing that happens when you use the feature to distribute the form is the form is enabled Reader, you can do separately, but you really shouldn't do if the form must be used by others. The dispenser a form must activate using their copy under license of Acrobat Reader.

  • Script to validate a field when submit button does not

    I have a script to validate certain fields and generate an error message if the fields are empty or not filled out correctly. Everything works well except for one of them. I'm trying to generate an error message if one of the fields has an invalid format in it. For example, the format must be "XXXX. XX "(all numbers) so if they enter"XXXX"generates the error message and does not have a shape. I have a setup of the function in this area and it works but unfortunately users ignore the error message and submitting the form when same and this field really need to be right before being transmitted.

    That's what I use for this:

    var bCancel = false;

    var strMsg = "";

    {If (getField("Tracking").value == {/ ^ \d{0,4}(\.\d{0,2})?$/})}

    bCancel = false; }

    If (getField("Tracking").value! = / ^ \d{0,4}(\.\d{0,2})?$/) {}

    strMsg = "Invalid Format. Please correct before proceeding. (EX: 0000.00) « ;

    bCancel = true; }

    So the problem is it generates the error message now even if the format is correct. I do not know I did something wrong, but I wrote the format in the same way (/ ^ \d{0,4}(\.\d{0,2})?$/) when I ran a script to format custom in this area and it worked fine, so I don't know what I'm doing wrong. I am also including this part of the script with the rest of the field controls in the submit button. So altogether it looks like this (just with a lot more fields, does not include all the bc it gets quite redundant)

    var bCancel = false;

    var strMsg = "";

    {If (getField("Tracking").value == {/ ^ \d{0,4}(\.\d{0,2})?$/})}

    bCancel = false; }

    If (getField("Employee_Name").value > = 1) {}

    bCancel = false; }

    If (getField("AcctNbr1").value > = 1) {}

    bCancel = false; }

    If (getField("Tracking").value! = / ^ \d{0,4}(\.\d{0,2})?$/) {}

    strMsg = "follow-up field format is invalid. Please correct before proceeding. (EX: 0000.00) « ;

    bCancel = true; }

    If (getField("Employee_Name").value == "") {}

    strMsg = "at least one required field is empty for export. Please fill the required fields (in bold) before continuing. « ;

    bCancel = true; }

    If (getField("AcctNbr1").value == "") {}

    strMsg = "at least one required field is empty for export. Please fill the required fields (in bold) before continuing. « ;

    bCancel = true; }

    If {(bCancel)

    App.Alert (strMsg);

    } else {}

    this.mailDoc({)

    bUI: true.

    cTo: " ""[email protected]", ".

    ({bassujetti: ' form returned: interview form "});

    }

    I'm fairly new script, especially in Adobe, so I probably did a great job with this. Please let me know if there is anything I should change to make it work better. Thank you in advance for your help!

    Yes, it's really hard to tell what is happening without seeing the file. You can post here, but if you can't post elsewhere (e.g., acrobat.com), feel free to send me by e-mail (see my profile) and I'll take a look.

  • "The operation is not allowed" error when you click on the SUBMIT"" button.

    I created a form in Acrobat 9 with a "submit" button in order to send the entire form by e-mail.  Under the export format, the PDF the complete document option button is selected.

    The submission is a hidden button until the user presses a button (accepting a warning in the codument; irrelevant); then the Send button appears and can be clciked on. It works very well

    It seems to not work on some browsers MS Internet Explorer or Reader 9 and will return the error "the operation is not allowed.

    The URL field is defined as

    mail to: [email protected]

    On Safari (MAC) browser, when you press the option button to display the Send button, the Send button at all.

    Any ideas?

    I have no idea about the appearance on the MAC, but submit with drive problem, it's that you must enable the form for readers to submit the entire form. There is no need to submit the entire form as FDF or XML data files are easily import the form in Acrobat. The problem with the activation of the rights of the reader, is that you are limited by the license to 500 copies. If you get more than that, you're violating the license. You can negotiate with Adobe if you plan to spend for a substantial sum. If you do not enable the rights of the player, then people should have no problem with the submission (with the exception of any mail problems - a danger of using electronic submission) and you would not have a problem with the license.

    It would be useful to know if you have created the form in Acrobat or Designer. There are significant differences.

  • need help on submit action when the form in HTML rendering

    When the FORM is rendered in HTML format, the Send button does not work,

    Here are the steps I performed in my existing XDP form.

    (1) added a button to the XFA object form dom

    2) gave the following properties for the button send in the object palette

    (a) selected the Type of Contron as run

    (b) gave a REST breakpoint in the Button property

    data packet XDP Selected c) as the type of shipment

    (d) selected UTF-8 as the type of coding of data

    3) I made the form in the browser (not in the workspace container), but by directly applying the profile with the url XFAFORMS http://localhost: 8080/lc/content/xfaforms/profile/default/html? contentRoot = repositor / / / pat h to the XDP file & template = file name

    (4) by clicking on the button send the form, the following error is thrown, please let me know where I'm wrong in the approach to invoke a REST call the end point of process

    "Error 500: DSCError: ComponentID = DSC ErrorCode = 122 MinorCode = 0 = parameter Input Message: {2} not found on the operation: {0}. {1} ErrorMessage: input parameter: {2} not found on the operation: {0}. {1}.

    Greetings-

    Ashok D

    Guys, the reason I was not able to send my form to the endpoint process was because I had designed the process to take an xml as input by the formData variable name, and it seems that the invocation of the REST of the HTML form sends the data as a map of the string.

    I changed my process to make a map as input as input instead of XML parameter and recovered the form data in the plan in the process.

    Steps of the

    (1) create a process with a variable of type of strings as input sheet

    (2) create your form and include the http submit button and provide the url of the endpoint REST as input for the button send or include a simple button and select the category that submit and provide the necessary entries in the tab submit.

    (3) in the process, use an execute event and get the value of the input as a string with the following expression data

    Map[@data]

    (4) converts the string into XML and use in your process.

    Greetings-

    Ashok D

  • What do need me for when the sale of an iPhone that won't turn on in order to remove my information?

    What do need me for when the sale of an iPhone that won't turn on in order to remove my information?

    If it lights why if someone buy it?

  • Satellite A30: Need driver for button front

    Hello
    I have a Satellite A30 laptop computer on which I have freshly installed WinXP (no recovery CD). It now extends so far as well. Now I'm looking for drivers for the front buttons.
    I could not find in the download of A30 (pilot controls!) Can someone tell me, where I can find these? Thanks in advance!

    PS: Sorry for my bad English! :)

    Hello

    This is not true. You can install the driver from Toshiba on the Windows XP BUT you must install the drivers of Toshiba and utility in the right order!
    It is not very easy.
    As far as I know to install the chipset driver first. The Easy button driver is responsible for shortcut keys.

    Installation of standby power in use? For me, this tool has nothing to do with the keys, but I found the info you need to the system management Bus driver. With related management system and power System Management Bus (SMBus) chips can communicate with the rest of the system.

    However, I found a lot of QFE on the page of the driver to be installed also. As you can see the manual installation is very easy and that's why he s is recommended to use the Toshiba Recovery CD.

Maybe you are looking for

  • Having trouble with my internet connection through wifi. N600 router is what I think.

    I had some problems with my internet connection recently via my wireless router. I get the little triangle yellow and with the connection at different times and I can't call my local internet provider because it still works when they are open, and th

  • How to upgrade a 1 d table multiple graph/diagram of dispersion

    Hi, I am trying to add data to the chart single parcel you see below.  It is a 1 d array.  When I build another table to add to that, he becomes a 2d array and am not sure how to handle this data in another graph/chart.  I have a set x-scale-10 a-100

  • PlotYAppend to draw more than 1000 points

    Dear all When I tried to add more than 1,000 points for a WaveformPlot on a WaveformGraph, only the last 1000 points were plotted on the graph. Take into account that I use the method "PlotYAppend" to add points to the plot. Please advice because we

  • This string as boolean data.

    Hello! I get the UDP data READ the string FUNCTION and want to present only tracks (like 10011100-11001100...) the channel indicator allows me to see the CODES/HEX/ASCII data only. your help please.

  • Menu Text Wrap, no submenu now...

    Hi, I had to switch to manual mode to create the skin on my menu button, easy. However, I am not able to see menu sub-pages. I tried all sorts of things, but it does not work. I hope there is a solution to this.   At soon Kel