Use CheckBox to make Submit Button visible

I am making a form with LifeCycle Designer and want a check box that says basically "I accept these terms". Users have to check it before submitting. I thought perhaps I could make the submit button invisible and code the check box with something like
if (this.getField("MyCheckBox").value; == 1)
{EmailSubmitButton1.presence = "visible"};
but I'm not sure of the script or where to place it to get it to work. Any ideas?
Thanks,
Karen

View the following images for some help...
1) http://img225.imageshack.us/my.php?image=designer1bg0.jpg
You need to expand the code portion of the interface if you haven't already done so, by clicking on the arrow (part circled in red) shown in the image.
2) http://img219.imageshack.us/my.php?image=designer2wb0.jpg
When you have your object highlighted (in my example I dragged a button on, you should choose the checkbox on your form) choose "change" from the event dropdown.
3) http://img225.imageshack.us/my.php?image=designer3ik6.jpg
Enter your code in the provided space, make sure your language is set to JavaScript and not FormCalc (dropdown circled in red).

Similar Messages

  • I want make my button visible or invisible on click of button

    Hi All
    I want make my button visible or invisible on click of button.
    Regards
    Kirankumar M

    HI Kiran,
    Your Question:
    onclick button should be visible and on second click it should become invisible.
    Answer:
    In your View
    1.Add Two button using Apply Template--actionButton
      So two buttons will get added to the view
    2.Create an attribute in View Context say buttonset of type com.sap.ide.webdynpro.uielementdefinitions.Visibility
    Bind the visible property of second button to buttonset attribute
    This attribute is  to set visibility
    Also create a booloean attribute bool in the View context
    3.In DoInit method
    wdContext.currentContextElement().setBool(true);
    So that both buttons are visible in View initially
    4.In First button event handler onActionButton()
    call second button eventhandler onActionButton_0()
    public void onActionButton(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionButton(ServerEvent)
           onActionButton_0(wdEvent);
        //@@end
    Here onActionButton_0() is like one method which is actually making second button visible or invisible based on boolean value bool=true /bool=false
    5. Write the following code in onActionButton_0() to perform the actual action
        if(wdContext.currentContextElement().getBool()==true){
                wdContext.currentContextElement().setButtonset(WDVisibility.NONE);
                wdContext.currentContextElement().setBool(false);
    else{
           wdContext.currentContextElement().setButtonset(WDVisibility.VISIBLE);
                      wdContext.currentContextElement().setBool(true);
    6.Now build and deploy ans run your application.
    It works..
    Nice Question..
    I was excited trying this...
    Hope it helps You
    Regards,
    Archana
    Edited by: Archana CTS on Mar 19, 2009 2:08 PM

  • Submitting a form using Adobes built in submit button

    Hello All,
    I have created a form in Acrobat XI Pro and use the built in distribute wizard
    Adobe opens up and asks for the email to send the forms to.
    This works fine.
    When the user fills the form and press the Adobe submit button, (not the one you add to a form) how can I indicate to the user the button was pressed!
    Thanks

    Is there any way after pressing the submit button i can set a flag or message?

  • New to Flash, create a flash form which is emailed using CGI script when submit button is pressed

    I'm trying to build a form in flash that is emailed using CGI
    script. I'm just lost and confused and I just can't seem to figure
    this out.
    This is the CGI coding for HTML and I just need to convert it
    to use in CS3:
    <form action="
    http://www.hostmonster.com/monstermail"
    enctype="multipart/form-data" method="POST">
    Name: <input type="text" name="Name"><br>
    Email: <input type="text" name="mailfrom"><br>
    Phone: <input type="text" name="Phone"><br>
    Service: <input type="text" name="Service"><br>
    <input type="hidden" name="sendtoemail"
    value="[email protected]"><br>
    <input type="submit" value="Send Email">
    </form>
    This is a link to what I'm working on:
    http://www.alternativesolutionsforyou.com/contact.htm

    OK, sorry....no more errors when I test the movie but when I
    test it live....nothing happens???? Here's the link again:
    http://www.alternativesolutionsforyou.com/contact.htm
    Code as it is:
    lv=new LoadVars();
    lv.Name=name.text;
    lv.mailfrom=email.text;
    lv.Phone=phone.text;
    lv.Service=service.text;
    lv.sendtoemail="[email protected]"
    yourSubmitButton.onPress=function(){
    lv.sendAndLoad("
    http://www.hostmonster.com/monstermail",lv,"POST");
    lv.onData=function(){
    // data successfully sent
    // this will execute if your cgi script returns something
    after executing
    I haven't adjusted what happens after you his the submit
    button yet.....just trying to get the email working.

  • How to make a checkbox that makes a subform visible also go to the subform

    Newbie here - no java knowledge. I have a subform that becomes visible when a checkbox is used. How do I make the form go to the subform as it becomes visible? Thanks for your help! RL

    Sorry - I was reading your messages in my email, not on the forum page.
    My original form is very long, with many options on it. When an option is chosen, I have a subform become visible, but the user would have to scroll down to see it. I'm making the form for teens, and want it to be foolproof and bombproof. So I need the selection of a checkbox to take the user directly to the subform. See "What will you be performing?" with vocal, musical theatre, theatre, dance, instrumental checkboxes on the attached form.
    I have been using:
    if (this.rawValue == 1){
            VocalSubformPage2.presence = "visible";
    }else{
            VocalSubformPage2.presence = "hidden";
    event.target.pageNum = 1;
    as suggested by Patrick, but it isn't working consistently. I have a subform for each category as a separate page. The content is positioned to stay on that page, and can't flow into another. Thanks for your help.
    Randee

  • How to use checkboxes instead of radio button in datagrid

    I have a datagrid. I have two checkboxes in datagrid.That checkboxes should act like radio button.ie we can select only one checkbox at a time. If we select second checkbox,then the first selected checkbox should deselected.How to handle this scenario.Please give some code samples.
    Thanks & Regards
    kvpdy

    You could do that, but it will be a lot easier doing it from the data model. This way you don't have to modify the behavior of the chart, it just blindly renders the data given to it. Behind the scenes you're dealing with boolean values, so it's pretty easy to write setters accomplish this.
    public function set myAttribute(value:Boolean):void
         setAttributesTiedTogetherToFalse();
         _attrib = value;

  • No submit button in distributed form - JavaScript help

    I have creted a from in Live Cycle Designer. After distribution submit button is not visible in Acrobat and Reader. I've looked at the form JavaScript and find out this part of code which probably hide submit button in Acrobat 9:
    showAutoGenSubmitBtn = function(bShow)
        var autoGenSubmitName = "%AUTO_GEN_SUBMIT_NAME%";
        var fld = this.getField(autoGenSubmitName);
        if (fld != null)
            var b= this.dirty;
            if (bShow)
                fld.display = display.noPrint;
            else
                fld.display = display.hidden;
            this.dirty= b;
    // Hide the auto-generated submit button for Acrobat/Reader >= 9.0
    if (app.viewerVersion >= 9)
        showAutoGenSubmitBtn(false);
    else
        showAutoGenSubmitBtn(true);
    I am not familair with JavaScript so I would apprecite if someone can help me how to edit it to make submit button visible.
    Below is a complete JaveScrip of mentioned form.
    Thanks
    //@@FORMSWORKFLOW auto-generated script
    AdobePatentID="B643"
    var AdobePatentID = "AdobePatentID=\"B643\"";
    // Show a dialog to ask the user's name and email during submit.
    askUserIdentity = function(doc)
        // string constants
        var dlgStrings =
            sDlgTitle:          "Send Form",
            sEmailLabel:        "&Email Address:",
            sNameLabel:         "Full &Name:",
            sSubmitLabel:       "&Send",
            sToLabel:           "To:",
            sSubjectLabel:      "Subject:",
            sSubjectContent:    "Submitting Completed Form",
            sAttachmentLabel:   "Attachment:",
            sFromLabel:         "From:",
            sErrorEmailRequired:"Please enter a valid email address.",
            sErrorNameRequired: "Please enter your name."
        var dlgElems = [];
        dlgElems[dlgElems.length] = {
            type: "view",
            align_children: "align_left",
            elements:
                    type: "view",
                    align_children: "align_row",
                    elements:
                            type: "static_text",
                            name: dlgStrings.sToLabel,
                            width: 80,
                            bold: true,
                            font: "dialog"
                            type: "static_text",
                            item_id: "sdto",
                            width: 270,
                            font: "dialog"
                    type: "view",
                    align_children: "align_row",
                    elements:
                            type: "static_text",
                            name: dlgStrings.sSubjectLabel,
                            bold: true,
                            width: 80,
                            font: "dialog"
                            type: "static_text",
                            name: dlgStrings.sSubjectContent,
                            width: 270,
                            font: "dialog"
                    type: "view",
                    align_children: "align_row",
                    elements:
                            type: "static_text",
                            name: dlgStrings.sAttachmentLabel,
                            bold: true,
                            width: 80,
                            font: "dialog"
                            type: "static_text",
                            item_id: "atch",
                            width: 270,
                            font: "dialog"
                    type: "gap",
                    height: 5,
                    width: 350
                    type: "static_text",
                    name: dlgStrings.sFromLabel,
                    bold: true,
                    font: "dialog"
                    type: "static_text",
                    name: dlgStrings.sEmailLabel,
                    bold: true,
                    font: "dialog"
                    type: "edit_text",
                    item_id: "emal",
                    width: 250
                    type: "static_text",
                    name: dlgStrings.sNameLabel,
                    bold: true,
                    font: "dialog"
                    type: "edit_text",
                    item_id: "name",
                    width: 250
                    type: "gap",
                    height: 5,
                    width: 350
                    type: "ok_cancel",
                    ok_name: dlgStrings.sSubmitLabel
        var desc = {
            resourceContext: "AcroForm",
            description:  {
                name: dlgStrings.sDlgTitle,
                elements: [
                        type: "view",
                        align_children: "align_left",
                        elements: dlgElems
        desc.initialize = function(dialog)
            var METADATA_ANNOT_NAME = "adhocFormState";
            var PROP_INITIATOR = "initiator";
            var initiator;
            var annot = doc.getAnnot(0, METADATA_ANNOT_NAME);
            if (annot != null) {
                var arrProps = new Array();
                arrProps = annot.contents.split(";");
                initiator = getProperty(arrProps, PROP_INITIATOR);
            var decodedFileName = unescape(doc.documentFileName);
            var initVars =
                sdto: initiator,
                atch: decodedFileName
            dialog.load(initVars);
        desc.validate = function(dialog)
            var values = dialog.store();
            if (values.emal == "") {
                app.alert(dlgStrings.sErrorEmailRequired);
                return false;
            if (values.name == "") {
                app.alert(dlgStrings.sErrorNameRequired);
                return false;
            return true;
        desc.commit = function(dialog)
            this.result = new Object;
            var values = dialog.store();
            this.result.name = values.name;
            this.result.email = values.emal;
        var ret = app.execDialog(desc);
        if (ret == "ok")
            return desc.result;
        else
            return null;
    askEmailClient = function(doc)
    // string constants
        var dlgStrings =
            sDlgTitle:      "Select Email Client",
            sDlgText:       "Please indicate the option which best describes how you send mail.",
            sDesktop:       "&Desktop Email Application",
            sDesktopDesc:   "Choose this option if you currently use an email application such as Microsoft Outlook Express, Microsoft Outlook, Eudora, or Mail.",
            sInternet:      "&Internet Email",
            sInternetDesc:  "Choose this option if you currently use an Internet email service such as Yahoo or Microsoft Hotmail. You will then need to save your form and return it manually to [email protected] using your Internet email service."
        var dlgElems = [];
        dlgElems[dlgElems.length] = {
            type: "view",
            align_children: "align_left",
            alignment: "align_fill",
            elements:
                    type: "static_text",
                    name: dlgStrings.sDlgText,
                    width: 350,               
                    font: "dialog"
                    type: "radio",
                    name: dlgStrings.sDesktop,
                    item_id: "rad1",
                    group_id: "rgrp",
                    bold: true,
                    font: "dialog"
                    type: "view",
                    align_children: "align_top",
                    elements:
                            type: "gap",
                            width: 20
                            type: "static_text",
                            name: dlgStrings.sDesktopDesc,
                            wrap_name: true,
                            width: 342,
                            font: "dialog"
                    type: "radio",
                    name: dlgStrings.sInternet,
                    item_id: "rad2",
                    group_id: "rgrp",
                    bold: true,
                    font: "dialog"
                    type: "view",
                    align_children: "align_top",
                    elements:
                            type: "gap",
                            width: 20
                            type: "static_text",
                            name: dlgStrings.sInternetDesc,
                            wrap_name: true,
                            width: 342,
                            font: "dialog"
                    type: "gap",
                    height: 5,
                    width: 350
                    type: "ok_cancel",
        var desc = {
            resourceContext: "AcroForm",
            description:  {
                name: dlgStrings.sDlgTitle,
                width: 250,
                elements: [
                        type: "view",
                        align_children: "align_left",
                        elements: dlgElems
        desc.commit = function(dialog)
            this.result = new Object;
            var values = dialog.store();
            this.result.send = values.rad1;
            this.result.save = values.rad2;
        var ret = app.execDialog(desc);
        if (ret == "ok")
            return desc.result;
        else
            return null;           
    AdobePatentID="B643"
    // set a new property value to a property in the specified array.
    setProperty = function(arrProps, propName, propValue)
        var i;
        var bSet = false;
        for (i = 0; i < arrProps.length; i++) {
            var propParts = new Array();
            propParts = arrProps[i].split(":");
            if (propParts[0] == propName) {
                propParts[1] = propValue;
                arrProps[i] = propParts.join(":");
                bSet = true;
                break;
        if (!bSet)
            arrProps[arrProps.length] = propName + ":" + propValue;
    AdobePatentID="B643"
    // get the value for a property in the specified array.
    getProperty = function(arrProps, propName)
        var i;
        for (i = 0; i < arrProps.length; i++) {
            var propParts = new Array();
            propParts = arrProps[i].split(":");
            if (propParts[0] == propName) {
                return propParts[1];
        return null;
    AdobePatentID="B643"
    showAutoGenSubmitBtn = function(bShow)
        var autoGenSubmitName = "%AUTO_GEN_SUBMIT_NAME%";
        var fld = this.getField(autoGenSubmitName);
        if (fld != null)
            var b= this.dirty;
            if (bShow)
                fld.display = display.noPrint;
            else
                fld.display = display.hidden;
            this.dirty= b;
    // Hide the auto-generated submit button for Acrobat/Reader >= 9.0
    if (app.viewerVersion >= 9)
        showAutoGenSubmitBtn(false);
    else
        showAutoGenSubmitBtn(true);

    I'm distributing the form in Acrobat Pro 9.
    I created the form in Live Cycle Designer.  Save, then open in Acrobat pro.  Extend Features to Acrobat Reader, click the drop down box on Forms and hit distribute.  I save a local copy.  When I open the distributed form the buttons do fall silent, the Submit Button on the purple line up top still works, but that doesn't appear in reader and the people who will be completing the form all use reader.  Any suggestions for a fix?
    I'd like to distribute because that automates the tracking.  It works undistributed.

  • No property to make htmlb:button invisible or visible??

    I am working on a jspdynpage proj where I need to make htmlb:button visible/invisible at runtime.. is there any property?

    Hi Kiran,
         You can use Java Script to make this happen. To make invisble or to disable use the following
    <input style="visibility:hidden;" type="button" value="Hello world!" disabled> . You can get the attributes of the button in varible, then start modifying the attribute at run time.
    Thanks
    Sathish

  • Submit button issue in Acrobat 8 Professional/LifeCycle Designer

    I am using Acrobat 8 Professional and LifeCycle Designer 8.0 on a PC with XP Pro. I first made forms using the default email submit button and had an XML data file submitted.
    I'm now making the forms to submit as a pdf file rather than an XML file. I selected a regular button rather than the email submit button provided and made it a submit button to be submitted as a pdf.
    The forms are being sent as pdf files attached to emails using Outlook. The issue is that every computer has a different "reaction" to this submit button. My computer (PC), when I tested the forms,everything was fine - Outlook opened and I was able to submit the file. On another PC in my office, when she clicked the submit button, nothing happened at all. On a PC at home, I got an error message "this operation is not permitted." And someone on a Macintosh did not even get a submit button showing up on the pdf.
    We need to be able to send these files out so that everyone can complete them easily. I would appreciate any ideas on how to make the submit button so that it works on all platforms and computers.
    Thank you so much,
    Marcy

    Thank you to you both for your suggestions.
    Actually, Bill, this will not be a controlled environment at all. We want to be able to email forms to all of the 80 parents in the school, and have the parents complete them as pdf's and submit the information back to us as a complete pdf form. This opens up the potential for 80 different computers/ISPs/environments. And of course, my supervisor wants it seamless and easy with no glitches for all 80!! So as you can see, I have my challenge with this project.

  • Submit button problem

    I am using Acrobat 8 Professional and LifeCycle Designer 8.0. I first made forms using the default email submit button and had an XML data file submitted.
    I'm now making the forms to submit as a pdf file rather than an XML file. I selected a regular button rather than the email submit button provided and made it a submit button to be submitted as a pdf.
    The forms are being sent as pdf files attached to emails using Outlook. The issue is that every computer has a different "reaction" to this submit button. My computer (PC), when I tested the forms,everything was fine - Outlook opened and I was able to submit the file. On another PC in my office, when she clicked the submit button, nothing happened at all. On a PC at home, I got an error message "this operation is not permitted." And someone on a Macintosh did not even get a submit button showing up on the pdf.
    We need to be able to send these files out so that everyone can complete them easily. I would appreciate any ideas on how to make the submit button so that it works on all platforms and computers.
    Thank you so much,
    Marcy

    It might work on your machine as you designed in & using Adobe Acrobat. In order to make it work with rest of the world (Adobe Reader) you may have to assign certain rights using Reader Extensions server. Also heard Adobe Acrobat is preloaded with limited capacity to enable such rights even if you do not have "Reader Extensions".

  • How to make the buttons INVISIBLE in the Application toolbar

    Hi All,
    I have a requirement to create a button in the Application toolbar of the Module Pool Screen. The field should be made Invisible by default. and it should be displayed based on one condition.
    Could you please let me know how to make that particular button INVISIBLE. I think we can make it invisible by using EXCLUDING statement. But, How to make the button VISIBLE again when the check is satisfied.
    I found from the portal that the FM 'VIEW_SET_PF_STATUS' can be used to make a button INVISIBLE. Could anyone help me out how to pass the parameters to this Function module?
    or is there any Function Module available to make the button VISIBLE and INVISIBLE? Please help me on this issues.
    Is there any possibility to make the button VISIBLE or INVISIBLE as we do for the screen fields using LOOP AT SCREEN..?
    Thank you in advance.
    Regards.
    Paddu.

    Hi,
    Try to use below in the PBO module status_0100 OUTPUT.
    DATA t_fcode TYPE TABLE OF sy-ucomm.
    refresh t_fcode[].
    APPEND 'Function code name of the button' TO t_fcode. 
    Check the condition here for which you want to make field visible.
        DELETE FCODE of the button from T_FCODE table
      ENDIF.
      SET PF-STATUS 'STATUS_0100' EXCLUDING t_fcode.

  • Button visible

    Hello,
    How can i make a button visible if a shared variable is true and not visible if that same varable is false...?? is this possible??

    Romain_H wrote:
    I would like to do the same but the problem is i have to run the vi each time.
    If you want to switch visibility with a FP control while the VI is in edit mode, you can make an xcontrol consisting of a button and a switch for its visibility.
    Typically, you should design your VI such that it always runs during use. It can be in a wait state when it's not supposed to do anything.
    LabVIEW Champion . Do more with less code and in less time .

  • Javascript Submit button onclick event handler

    Hi,
    I am having trouble getting the onclick event handler of a form to execute when the button is pressed. I am trying to open a page in a new window depending on if the user selects that option in a checkbox.
    There is one form(id='graphform') and 2 submit buttons, each with a checkbox before it. I want the new window to open only iuf the right checkbox and matching submit button has been checked.
    One of the checkbox/button pair: The onclick="checkWindow('w1','graphform');" is never getting called.
    <input type="checkbox" id="w1" name="win1" style="margin-right: 10px" value="window"  onclick="javascript:document.gform.win1[0].checked = true;"><a style="margin-right: 10px">Graph in new window</a>
    <input type="submit" value="Create graph" onmouseover="this.form.cumulat.value='0';this.form.graphGroup.value='Consumption'; document.getElementById('hintSubmitStop').value='1';" onclick="checkWindow('w1','graphform');" onmouseout="document.getElementById('hintSubmitStop').value='0';" /></td></tr>Javascript window opener:
    function checkWindow(win1, str){
              var formObj = document.getElementById(str);
         var checkBoxObj = document.getElementById(win1);
         if(checkBoxObj1.checked == true){
                   formObj.target = "_blank";     
                   formObj.action = "graphDisplayFrame.jsp";     
         else if(checkBoxObj1.checked == false){
                   formObj.target = "_self";
                   formObj.action = "graphDisplay.jsp";
    }Any suggestions?
    J

    You're storing the value in "checkBoxObj" and in the next line you use different variable name as "checkBoxObj1".
         var checkBoxObj = document.getElementById(win1);
         if(checkBoxObj1.checked == true){
    instead of "true', try      if(checkBoxObj.checked == 1){

  • Problem making buttons visible

    Hi there, I have a poker game that all worked fine until I was told to restructure it in a MVC style. I never had this problem before I changed it but I'm having issues with making my buttons visible when it's the players turn. At first I setVisible to false which works fine, then I call my method to display them from my model and they display fine, so seemings as all is good to here I think it's the next bit that's causing my issue, I have actionListeners attached that when fired setsVisible on all the buttons to false again (which works) but the next time I call my method to make certain buttons visible they don't appear. I've tested that the method is being called with the correct parameter passed and it is. Now I must apologise because my knowledge of swing is very poor but I have searched and read alot and tried several approaches with no joy, I will definitly be studying up more on it in the future but time is against me at the mo. The only thing that seems to half work is if I use this.paint(g) the buttons display as I want them but my program crashes cos to be honest I don't know what g should be. Is this the right approach or is there a more simple way I can update my GUI to display my buttons?

    Works for me but you could try to add a revalidate(); repaint(); on the buttons parent.
    import java.awt.BorderLayout;
    import java.awt.EventQueue;
    import java.awt.event.ActionEvent;
    import javax.swing.AbstractAction;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    public class TestVisible {
        public static void main(String[] args) {
            EventQueue.invokeLater(new Runnable() {
                public void run() {
                    final JButton button = new JButton("I do nothing");
                    final JFrame frame = new JFrame("Test");
                    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
                    frame.getContentPane().add(button);
                    frame.getContentPane().add(new JButton(new AbstractAction("Toggle") {
                        @Override
                        public void actionPerformed(ActionEvent e) {
                            button.setVisible(!button.isVisible());
    //                        frame.getRootPane().revalidate();
    //                        frame.getRootPane().repaint();
                    }), BorderLayout.PAGE_START);
                    frame.pack();
                    frame.setLocationRelativeTo(null);
                    frame.setVisible(true);
    }

  • Please Help! Deleting multiple record by using checkbox selected

    Hello everybody,
    I am a new to JSP. I really don't know how to delete multiple record by using checkbox selected and pressing submit button.
    For example, deleting webmailbox letters using checkbox selected and delete button. The mail we checked will delete from the inbox.
    I like to use my user account deleting system of my project like above example.
    How can I do in JSP? I will very please you if you share you knowledge and code for me.
    If you have URL address, could you share me for reference?
    Please help me...
    With Thanks and Regards,
    wtdahl

    Take a look at this thread, I thing it answers your question quite good:
    http://forum.java.sun.com/thread.jsp?thread=516658&forum=45&message=2463505

Maybe you are looking for