Amount Field Drop Down

I would like to add '---Please Select---' to my amount field dropdown.
But using this field allows you to submit the form (using a payment method other than credit card), without notifying you that it is a required field.
Then when it submits it goes to a white page and won't properly process.
Anyone know how to get around this as I have 5 different payment options and it would be great to have the customer make sure they choose the correct payment option for their needs.

Try hiding the amount field, then insert a custom drop down list which contains the prices. When a drop down is selected, that value will then populate the hidden amount field with the price selected. You'll need to use JavaScript.

Similar Messages

  • Input Masks and Single Choice Fields (drop down menu) Suggestions

    Here's a few suggestions - I hope this is the right place to post these...
    1. I would like to suggest a pre-filled state single choice field (drop down menu) to be used to get address information.  Or better yet a way to import a csv file to fill the preset fields for an option box.
    2. Input masks that force users to enter the data in the format you prefer.  (000) 000-0000
    3. Ability to enable or disable options depending on other choices.
    4. Option for a list of numbers say 1 thru 100 and as people pick a registration (car number in my case) that choice cannot be picked again by another user for that form.  Load values from a table that can be picked several times or only once could work in both my suggestions.
    Thank You.

    Hello there,
    Thanks for these thoughts! They're all really good (and welcome) suggestions for additions to the FormsCentral service. As you might imagine, we're busily working back here to implement new features; we have big plans for FormsCentral. For these suggestions in particular, I'll do two things:
    1. Send these suggestions to the product team and get them added to the to-do list!
    2. Move the whole thread here into the FormsCentral Ideas sub-forum. That way, your suggestions will be noted as such and well-documented on our end.
    Thanks for the great ideas; let us know if you have any more feedback for us!
    Best regards,
    Rebecca
    Acrobat Services Community Manager

  • REPORT_ATTRIBUTE_ERROR_MESSAGE functionality for Input Field & Drop down UI

    Hi,
    We have requirement to handle error messages. In a data input form, if we get multiple errors we are displaying all errors in a message area. When we click on error message, focus should go to the UI element which causes to the error.
    We have used 'CALL METHOD lo_message_manager->report_attribute_error_message' by exporting the element and attribute name. This method works fine incase of Input Field type UI element. When we run the application on DISPLAY action errors are displaying for both fields 'INPUT FIELD' and 'DROPDOWNBYINDEX' . But we have URL on the error related to 'INPUT FIELD'  and when we click on error message control/cursor going to the INPUT FIELD.
    But we could not find same functionality incase of DropDownbyIndex UI Element.
    Please help us to resolve the problem. Does SAP Web Dynpro ABAP provide this functionality?
    Below attached written code for reference.
    CASE lo_action->name.
          WHEN 'DISPLAY'.
            IF lv_num1 IS INITIAL.
             report message
              CALL METHOD lo_message_manager-report_attribute_error_message
                EXPORTING
                  message_text              = 'Please enter the value'
                  element                   = lo_el_numbers
                  attribute_name            = `NUM1`
                params                    =
                msg_user_data             =
                is_permanent              = ABAP_FALSE
                scope_permanent_msg       = CO_MSG_SCOPE_CTXT_ELEMENT
                msg_index                 =
                cancel_navigation         =
                is_validation_independent = ABAP_FALSE
            ENDIF.
            IF lv_age eq '999'.
             report message
              CALL METHOD lo_message_manager-report_attribute_error_message
                EXPORTING
                  message_text              = 'Please enter the age'
                  element                   = lo_el_personal_info
                  attribute_name            = `AGE`
                params                    =
                msg_user_data             =
                is_permanent              = ABAP_FALSE
                scope_permanent_msg       = CO_MSG_SCOPE_CTXT_ELEMENT
                msg_index                 =
                cancel_navigation         =
                is_validation_independent = ABAP_FALSE
            ENDIF.
        ENDCASE.
    Thanks
    Venkat

    Hi venki,
    The problem you have told that when you are displaying the error message for input box and drop down by idx  using the report_attribute_error_message. Then you click on the error message raised by input box , the focus goes to the input box but the same thing will not happen with the dropdownbyidx.
    I have also try the same this its not working for dropdownbyidx but it is working for dropdownbykey.
    You can try this.
    Regard
    Manoj Kumar

  • Populating fields, drop down lists, etc... from external data

    Hi,
    I am trying to evolve my forms, and am interested in learning how to connect my forms to external data sources.  I assume using server solutions would work, but are complex and costly.  They are also likely beyond my scope of understanding.  What are the best practices for doing this?  Can it be done with a text file or spreadsheet?  I am really looking for a better way to create custom data in forms than to go into the script and change them manually.  Price is a good example.  I have some forms that generate a very basic quote for services.  When the price of part x changes I need to going into the from chance the script for those items, re-save it and hope I have not missed any items.  Evey time his happens it is a hassle.  Not to mention if more than one user needs it I have to make sure they are all using the right version (to be clear I am less worried about this part as it seems a complex task).
    Is there a better way of doing this?  What are the best practices for this?  What external sources can be used to hold the data.  I would be interested in any tutorials that may exist on the subject as well.
    Thanks in advance for any/all help. 
    Tom
    P.S. it is amazing what LCD can do, and that I really enjoy working in it, although I have little background in scripting.  Great product and resource!

    Thanks Paul,
    I have been able to solve the drop down list question, thanks to your help.
    I have another question that involves locking specific fields in a four page form which contains approximately 100 fields that need to be locked before the end user completes the remaining fields. How do I lock individual subforms so that the remaining fields remain open and editable?  The final version of the form, will have at least 200 fields in it that will also need to be locked in sections.
    I can lock all the fields using the lock all fields button, but have been unable to make it work for just part of the form.
    I've emailed the draft form.  It would be really helpful if I had one example of a locked subform on the form I'm struggling with.
    Thanks for your help.
    Nellie

  • Mfbf field drop down list

    hi all,
       I want to put drop-down list for header text field in MFBF transaction. Is this possible?
    Is there any user-exit or Badi which serves this purpose?

    Hi
    You want data in the drop-down from database tables or some static values?
    Whatever it may be, just add a screen-exit & populate the things according to your requirements.
    Regards.

  • Translation for a custom field drop down box in shopping cart

    Hi All,
    My requirement is to translate the content in the dropdown list to German language which is coming under basic data screen of the shopping cart
    The logic behind is a custom field (suggested vendor) has been added a long back which has a search help when you click the find button it taking into a find screen there they created a dropdown box field which list out some values based on the values a set of fields will be displayed such away we can narrow down our searching.
    (E.g. searching a vendor based on company code or Search a Vendor based on Plant)
    Please suggest me any tables to locate the values or any BADI to fill the content.
    Regards
    Paul

    Hi,
    No you can add the customer fields in the header level also.
    Please look at the below structure to add the custom fields.
    INCL_EEW_PD_HEADER_CSF_SC      Customer Enhancements on Shopping Cart Header
    INCL_EEW_PD_HEADER_CST_SC      Tabular Customer Enhancements on Shopping Cart Header
    INCL_EEW_PD_HEADER_SSF_SC      SAP Internal Enhancements (IBUs, and so on) on SC Header
    INCL_EEW_PD_HEADER_SST_SC      SAP Int. Tabular Enhanc. (IBUs, and so on) on SC Header
    You will find this useful.
    https://websmp105.sap-ag.de/~sapidb/011000358700001969972008E.pdf
    Thanks
    Venkatesh P

  • Populate drop-down lists based on check box selections

    Hi. I'm creating a Service Work Order form. At the top, there are several check boxes for the various services we provide, under that , more text fields, drop downs and checkboxes to elaborate on those services, and then at the bottom, fields for pricing.
    I'd like the top half of the form to drive the pricing info that is available or that auto-populates at the bottom.
    Ideally, I'd like to make the pricing specific based on 3 things:
    the service checkbox
    the client
    and the details on that service
    For example:
    If Client XYZ wants Service A that includes subservice B
    $123 should show up on the bottom half in the field for that service
    If Client ABC wants Service B that includes subservice C
    $456 should show up on the bottom half in the field for that service
    Does that make sense?
    I've been unable to get code to work in either the calculate and pre-Open options
    I first tried calculate and used this code (which was just a guess on my part)
    if (CheckBox1 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 50
    elseif
    (CheckBox2 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 50
    elseif
    (CheckBox5 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 55
    elseif
    (CheckBox6 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 55
    elseif
    (CheckBox7 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 50
    elseif
    (CheckBox8 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 50
    else
    $.rawValue = 0
    endif
    That didn't do anything but give me an error about "and"
    So I tried putting code in pre-Open:
    // clear the dropdown displayed value and items
    this.rawValue = null;
    this.clearItems();
    // repopulate the items based on the checkboxes
    if(offshore.rawValue == 1)
        this.addItem("$40.00", "offshore_001");
        this.addItem("$45.00", "offshore_002");
        this.addItem("$50.00", "offshore_003");
    if(inland.rawValue == 1)
        this.addItem("$40.00", "inland_001");
        this.addItem("$45.00", "inland_002");
        this.addItem("$50.00", "inland_003");
    I got no error but nothing populated and the drop-down was, in effect, disabled.
    Any help would be appreciated.
    Thanks!

    Gavin,
    This sounds like an issue that is not related to JHeadstart. To simplify the test case, you could create a simple drag-and-drop ADF application without JHeadstart and see if the same problem occurs there.
    Your suggestion that it is related to the where clause seems likely. Please find out what kind of object USER_ENV is, and how it is initialized. Maybe this initialization is skipped when bouncing the application.
    What happens if you perform the query in SQL*Plus, without doing anything about the USER_ENV?
    Maybe you should ask the Oracle Applications discussion forum...
    kind regards,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • Drop-Down Warning

    I am attempting to create a drop-down of Texas Counties.  There are 254 of them.  When I created a drop-down object and attempt to add a number of entries above a certain amount the drop-down object is tagged with a yellow box containing "ABC!" and any mouse over of the new object in LCD results in a message box with "An invalid argument was encountered". The resulting drop down works fine on the saved form, but the warnings in LCD are annoying.  I am using LCD ES2 version 9.0.0.2.20101008.1.734229.  How can I solve this problem?

    I tried to replicate the scenario with LC designer 8.2 but unable to reproduce. Since i dont have the latest version i tried with 8.2.
    My suggestion is to check the error/logs tab in the designer or reinstall the designer.
    Thanks.

  • How to change the sort order of complex table in drop down

    Hi Team,
    I have a complex table which is working but the sort order i want in a different way. How can i change?
    Regards,
    Gupta

    Gupta,
    My screen field definitions are as follows:
    1. Location
    2. Partner
    --In my previous reply, the first screen shot is without any parent index. So it is giving all values in alphabetical order only.
    --After that I created parent index for partner with location, So the partner values are depend on location chosen.
    In my TEST1:
    --I just selected "Andhra pradesh" as location, In partner field drop down it is showing "Ragava" "Suman" "Sunitha" only.
    --Because these are only the values belong to "andhra pradesh" location and these are coming in alphabetical order only.
    TEST2:
    --Here I selected "Gujrat" as location, In partner field drop down it is showing "Avinash" "Mohan" "Suman" which are belong to "Gujrat" location, These are also in alphabetical order only.
    Hope this clears now. Still any query please post.
    Thanks,
    Swaroopa.

  • Creation of additional drop downs in 'Item overview' tab page on portal

    Hi,
    I would like to know how do we add additional fields/drop downs on  the xRPM portal in the  'Item Overview' tab page.
    For eg:
    We are having TECHNOLOGY TYPE field at Item overview tab page in xRPM portal - Portfolio Management view. Wherein we can have different dropdown values for selection.
    Question 1 -> Can we have similar dropdown created on the same page? If yes, how?
    Question 2 -> If we want to create more than one such dropdowns with their own defined dropdown values, can we maintain the dependency between them ?

    I went through the document on the mentioned by you.
    But my requirement is a bit diiferent.
    I want to have 3 different drop downs with a  numeric field attached to them.The sum of these numeric fields should always be 100 (two values are manually selected but the third value should be calculated automatically based on the previously selected values).
    Example,
    I select 10 as a value for Drop down 1, 40 for drop down2 then for the drop down3 the value should populate automatically as 50 (100 - (10+40)).i.e. the sum being 100.
    Can you or any one please help me with this.
    Also I am not sure how do we give multiple options for selection (like 10,20,..50 etc upto 100) for a drop down.

  • How to add drop down list in toolbar?

    Hi SAP CRM Experts,
    After save the personalization of the view, there will be a drop down list appeared in the toolbar in the view, the drop value contain the personalization you just saved and the standard one.
    Could someone let me know how to enhance this functionality to create not only the view configuration but also customizing field drop down list?
    That means we want drop down list in toolbar which contain several options also it's value could pass to view controller.
    Thanks in advance...
    Tony

    Could someone kindly help?

  • Form Drop down data

    Hi all,
    wondering if someone has info on adding multiple numbers or words to a form field drop down list without typing all of them one at a time. Preferably is there a way to pull an excell data column into a drop down? I've been researching delimited txt files but the references seem to point to and FDF file format and the context of most posts seem to be how to export the data not retrieve it.
    note: Basically have a product list containing 450 4-digit numbers I'd like team members to be able to select from the drop down form field.
    Thanks

    This can be achieved with a script, like this one, created by me:
    http://try67.blogspot.com/2009/11/acrobat-import-text-file-to-drop-down.html
    It allows you to select a plain-text file (or CSV file) and import the data from it into a drop-down or list box in Acrobat.

  • How do I use Javascript to populate a text field based on a selection from a drop down box?

    Greetings,
    I have virtually no experience with JavaScript and I am trying to figure out how to add some basic automation features to an Adobe form.  I have a drop down box called "Hospital_Name" that will contain approximately 7 possible selections.  When the user makes a selection, I would like to have the text field (called "Hospital_Address") below the drop down box populate with the corresponding address for the selection.  I have the "Hospital_Address" text field configured for multiple lines and would like the address to have a line break between the street address and the city/state/zip.
    For example, if the user selected "Hospital 1", the text field would display:
    123 Main St
    Anytown, CA 12345
    Any help or examples you can provide would be greatly appreciated.

    You have the element names within the object within brackets.
    Make sure your brackets are properly placed and matched.
    // Place all pre-population data into a single data structure
    var Location = {
    "--Hospital--":{ line1: " ", line2: " " },
    "Bellevue Medical Center":{ line1: "2500 BMC Drive", line2: "Bellevue, NE 68123" },
    "CHI Bergan Mercy":{ line1: "7500 Mercy Road", line2: "Omaha, NE 68124" }, 
    "CHI Immanuel":{ line1: "6901 N. 72nd Street", line2: "Omaha, NE 68122" }, 
    "CHI Lakeside":{ line1: "16901 Lakeside Hills Court", line2: "Omaha, NE 68130" }, 
    "CHI Midlands":{ line1: "11111 S. 84th Street", line2: "Papillion, NE 68046" },
    "Creighton University Medical Center":{ line1: "601 N. 30th Street", line2: "Omaha, NE 68131" },
    "Nebraska Medical Center":{ line1: "4400 Emile Drive", line2: "Omaha, NE 68105" }
    // some debugging code to see location names;
    console.show();console.clear():
    for(I in Location) {
    console.println(I);
    // end debugging code;
    function SetFieldValues(Hospital_Name) {
        this.getField("AddLine1").value = Location[Hospital_Name].line1;
        this.getField("AddLine2").value = Location[Hospital_Name].line2;
    This is not a beginners task but requires a fair amount of knowledge about the structure of objects, defining strings, and structure of arrays.
    Are you sure you have all the field names correctly spelled and capitalized?
    Do you get any error in the JavaScript console?
    Just trying the line that defines the "Location", I get the following error:
    SyntaxError: invalid property id
    1:Console:Exec
    undefined
    All the form field in a PDF are processed by using JavaScript and any error in any script will stop JavaScript processing.
    It might help to have a link to the problem form.
    Make sure your brackets are properly placed and matched.
    // Place all pre-population data into a single data structure
    var Location = {
    "--Hospital--":{ line1: " ", line2: " " },
    "Bellevue Medical Center":{ line1: "2500 BMC Drive", line2: "Bellevue, NE 68123" },
    "CHI Bergan Mercy":{ line1: "7500 Mercy Road", line2: "Omaha, NE 68124" }, 
    "CHI Immanuel":{ line1: "6901 N. 72nd Street", line2: "Omaha, NE 68122" }, 
    "CHI Lakeside":{ line1: "16901 Lakeside Hills Court", line2: "Omaha, NE 68130" }, 
    "CHI Midlands":{ line1: "11111 S. 84th Street", line2: "Papillion, NE 68046" },
    "Creighton University Medical Center":{ line1: "601 N. 30th Street", line2: "Omaha, NE 68131" },
    "Nebraska Medical Center":{ line1: "4400 Emile Drive", line2: "Omaha, NE 68105" }
    function SetFieldValues(Hospital_Name) {
        this.getField("AddLine1").value = Location[Hospital_Name].line1;
        this.getField("AddLine2").value = Location[Hospital_Name].line2;

  • Making drop down menu for entry fields in database

    <%@ page language="java" contentType="text/html" %>
    <%@ page import="java.io.*" %>
    <%@ page import="java.math.*" %>
    <%@ page import="java.util.*" %>
    <%@ include file="/global/util.inc" %>
    <%@ include file="/global/user_session.jsp" %>
    <%@ include file="/global/connection_prepare_marketing.jsp" %>
    <html>
    <head>
    <title>Marketing Data Entry</title>
    <LINK REL=STYLESHEET HREF="/global/app_main.css">
    <BODY bgcolor=#FEFFE8>
    <%
    int     CID = 0;     
         CID = Integer.parseInt(request.getParameter("cid"));
    if (request.getParameter("delete") != null) {
         // Do the delete via a PreparedStatement
            java.sql.PreparedStatement ps = null;
         ps = db.prepareStatement("delete from hit_or_miss where hom_ID = ?");
         ps.setInt(1, CID);
         ps.executeUpdate();
         CID = 0;
         out.print ("<font color=darkblue>The record has been deleted successfully</font>");
    if (request.getParameter("update") != null) {
           // Set inputs in order to evaluate
            String          DE = request.getParameter("date_entered");
                   DE = DE.replaceAll("[a-zA-Z]","");             // Get rid of letters
         String          SI = request.getParameter("summit_ID");
                   SI = SI.replaceAll(",","");                 //Get rid of commas
         String          TT = request.getParameter("transaction_type");    //No change needed
           String            NL = request.getParameter("notional");
                     NL = NL.replaceAll("[a-zA-Z]","");               // Get rid of letters
                     NL = NL.replaceAll(",","");                  // Get rid of commas
           BigDecimal      NTL = new BigDecimal(NL);
         String          ST = request.getParameter("structure");
         String          CP = request.getParameter("counterparty");
         String          ED = request.getParameter("expiry_date");
                   ED = ED.replaceAll("[a-zA-Z]","");                // Get rid of letters
         String          SD = request.getParameter("start_date");
                   SD = SD.replaceAll("[a-zA-Z]","");                // Get rid of letters
         String          MD = request.getParameter("maturity_date");
                   MD = MD.replaceAll("[a-zA-Z]","");                // Get rid of letters
         String          CT = request.getParameter("currency_type");
         String          MRKTR = request.getParameter("marketer");
           String            SSC = request.getParameter("sales_credit");
                     SSC = SSC.replaceAll("[a-zA-Z]","");         // Get rid of letters
                     SSC = SSC.replaceAll(",","");                 // Get rid of commas
           BigDecimal      SC = new BigDecimal(SSC);
         String          MRKP = request.getParameter("markup");
                   MRKP = MRKP.replaceAll("[a-zA-Z]","");    // Get rid of letters
                   MRKP = MRKP.replaceAll(",","");           // Get rid of commas
         BigDecimal     MP = new BigDecimal(MRKP);
         String          CC = request.getParameter("comments_color");
      if (     SD != null && MD != null && ED != null ) {
         // First get the ID to use     
            String sql = " "+
              "begin "+
                "declare @new_id int "+
                 "if (select count(*) from hit_or_miss ) = 0 "+
                 "       begin "+
                 "       select @new_id = 1 "+
                 "       end   "+
                 "else "+
                 "       begin "+
                "       select @new_id = max(hom_ID) + 1 from hit_or_miss "+
                 "       end "+
              "select newID=@new_id "+
           "end";
         int nID = 0;
         rs = st.executeQuery(" "+ sql + " ");
         while (rs.next()) {
              nID = rs.getInt("newID");
         // Get timestamp for insert
         java.util.Date curr_dt = new java.util.Date();
            java.sql.Timestamp dt = new java.sql.Timestamp(curr_dt.getTime());
         // Now we check if it is an insert or update based on the passed ID
         if (CID == 0) {
              // Do the insert via a PreparedStatement
              java.sql.PreparedStatement ps = null;
              ps = db.prepareStatement("insert into hit_or_miss values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
              ps.setInt(1, nID);
              ps.setString(2, DE);
              ps.setString(3, SI);
              ps.setString(4, TT);
              ps.setBigDecimal(5, NTL);
              ps.setString(6, ST);
              ps.setString(7, CP);
              ps.setString(8, ED);
              ps.setString(9, SD);
              ps.setString(10, MD);
              ps.setString(11, CT);
              ps.setString(12, MRKTR);
              ps.setBigDecimal(13, SC);
              ps.setBigDecimal(14, MP);
              ps.setString(15, CC);
              ps.executeUpdate();
              out.print("<font color=darkblue>The new record has been inserted into the database successfully</font>");
         } else {
              // Do the update via a PreparedStatement
              // First we insert a row into the archive table
                 java.sql.PreparedStatement ps = null;
                    ps = db.prepareStatement("update hit_or_miss set date_entered = getdate(), summit_ID = ?, transaction_type = ?, notional = ?, structure = ?, counterparty = ?, expiry_date = ?, start_date = ?, maturity_date = ?, currency_type = ?, marketer = ?, sales_credit = ?, markup = ?, comments_color = ? where hom_ID ="+CID+" ");
              ps.setString(1, DE);
              ps.setString(2, SI);
              ps.setString(3, TT);
              ps.setBigDecimal(4, NTL);
              ps.setString(5, ST);
              ps.setString(6, CP);
              ps.setString(7, ED);
              ps.setString(8, SD);
              ps.setString(9, MD);
              ps.setString(10, CT);
              ps.setString(11, MRKTR);
              ps.setBigDecimal(12, SC);
              ps.setBigDecimal(13, MP);
              ps.setString(14, CC);
              ps.executeUpdate();
              out.print("<font color=darkblue>This record has been updated successfully</font>");
      } else {
         out.print("<font color=red>You must fill in the date and amount sections of this form in order the write to the database to occur - please try again</font>");
         String DateEntered_text = null;
         String SummitID_text = null;
         String TransactionType_text = null;
         String Amount_text = "0000000.00";
         String Structure_text = null;
         String Counterparty_text = null;
         String ExpiryDate_text = null;
         String StartDate_text = null;
         String MaturityDate_text = null;
         String CurrencyType_text = null;
         String Marketer_text = null;
         BigDecimal SalesCredit_text = new BigDecimal(0.0);
         BigDecimal Markup_text = new BigDecimal(0.0);
         String CommentsColor_text = null;
         String Notional_text = null;
    if (CID == 0) {
         String Expiry_Date_text = "";
            String Start_Date_text = "";
            String Maturity_Date_text = "";
    } else {
         rs = st.executeQuery("select o.hom_ID, DateEntered=convert(varchar(10),o.date_entered,101), o.summit_ID, o.transaction_type, Notional=convert(varchar(100),convert(money,o.notional),1), o.structure, o.counterparty, ExpiryDate=convert(varchar(10),o.expiry_date,101), StartDate=convert(varchar(10),o.start_date,101), MaturityDate=convert(varchar(10),o.maturity_date,101), o.currency_type, o.marketer, o.sales_credit, o.markup, o.comments_color from hit_or_miss o where o.hom_ID =  "+CID+ " ");
         while (rs.next()) {
              DateEntered_text = rs.getString("DateEntered");
              SummitID_text = rs.getString("summit_ID");
              TransactionType_text = rs.getString("transaction_type");          
              Amount_text = rs.getString("Notional");
              Structure_text = rs.getString("structure");
              Counterparty_text = rs.getString("counterparty");
              ExpiryDate_text = rs.getString("ExpiryDate");
              StartDate_text = rs.getString("StartDate");
              MaturityDate_text = rs.getString("MaturityDate");
              CurrencyType_text = rs.getString("currency_type");
              Marketer_text = rs.getString("marketer");
              SalesCredit_text = rs.getBigDecimal("sales_credit",8);
              Markup_text = rs.getBigDecimal("markup",5);
              CommentsColor_text = rs.getString("comments_color");
    %>
    <table id="main" border=0 cellspacing="4" cellpadding=3 bgcolor="buttonface">
         <tr><td ><form name="myform" method="post" action="/applications/marketing/hit_or_miss.jsp">
    <table  border="0" cellspacing="4" cellpadding="3">
         <tr class=tableHeader>
              <td valign=top colspan=2 >Marketing Form</td>
         </tr>
         <tr>
              <td valign=top><font size="-1"><b>Date Entered:</b></font></td>
              <td>     
                   <input type=text name=date_entered size=8 value='<%=DateEntered_text%>'>
                   <a href="javascript: void(0);"
                   onmouseover="if (timeoutId) clearTimeout(timeoutId); window.status='Show Calendar'; return true;"
                   onmouseout="if (timeoutDelay) calendarTimeout(); window.status='';"
                   onclick="g_Calendar.show(event, 'myform.date_entered', false, 'mm/dd/yyyy'); return false;">
                   <img src='/images/calendar.gif' name='imgCalendar' width=20 height=10 border=0 alt=''></a>
              </td>
         </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Summit ID:</b> </font></td>
                    <td><input type=text name=summit_ID size=25 value='<%=SummitID_text%>'></td>
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Transaction Type:</b> </font></td>
                    <td><input type=text name=transaction_type size=25 value='<%=TransactionType_text%>'></td>
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Notional:</b> </font></td>
                    <td><input type=text name=notional size=25 value='<%=Notional_text%>'></td>
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Structure:</b> </font></td>
                    <td><input type=text name=structure size=25 value='<%=Structure_text%>'></td>
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Counterparty:</b> </font></td>
                    <td><input type=text name=counterparty size=25 value='<%=Counterparty_text%>'></td>
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Expiry Date:</b></font></td>
                    <td>   
                            <input type=text name=expiry_date size=8 value='<%=ExpiryDate_text%>'>
                            <a href="javascript: void(0);"
                            onmouseover="if (timeoutId) clearTimeout(timeoutId); window.status='Show Calendar'; return true;"
                            onmouseout="if (timeoutDelay) calendarTimeout(); window.status='';"
                            onclick="g_Calendar.show(event, 'myform.expiry_date', false, 'mm/dd/yyyy'); return false;">
                            <img src='/images/calendar.gif' name='imgCalendar' width=20 height=10 border=0 alt=''></a>
                    </td>  
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Start Date:</b></font></td>
                    <td>   
                            <input type=text name=start_date size=8 value='<%=StartDate_text%>'>
                            <a href="javascript: void(0);"
                            onmouseover="if (timeoutId) clearTimeout(timeoutId); window.status='Show Calendar'; return true;"
                            onmouseout="if (timeoutDelay) calendarTimeout(); window.status='';"
                            onclick="g_Calendar.show(event, 'myform.start_date', false, 'mm/dd/yyyy'); return false;">
                            <img src='/images/calendar.gif' name='imgCalendar' width=20 height=10 border=0 alt=''></a>
                    </td>  
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Maturity Date:</b></font></td>
                    <td>   
                            <input type=text name=maturity_date size=8 value='<%=MaturityDate_text%>'>
                            <a href="javascript: void(0);"
                            onmouseover="if (timeoutId) clearTimeout(timeoutId); window.status='Show Calendar'; return true;"
                            onmouseout="if (timeoutDelay) calendarTimeout(); window.status='';"
                            onclick="g_Calendar.show(event, 'myform.maturity_date', false, 'mm/dd/yyyy'); return false;">
                            <img src='/images/calendar.gif' name='imgCalendar' width=20 height=10 border=0 alt=''></a>
                    </td>  
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Currency Type:</b> </font></td>
                    <td><input type=text name=currency_type size=25 value='<%=CurrencyType_text%>'></td>
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Marketer:</b> </font></td>
                    <td><input type=text name=marketer size=25 value='<%=Marketer_text%>'></td>
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Sales Credit:</b> </font></td>
                    <td><input type=text name=sales_credit size=8 value='<%=SalesCredit_text%>'><b>%</b></td>
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Markup:</b> </font></td>
                    <td><input type=text name=markup size=8 value='<%=Markup_text%>'><b>%</b></td>
            </tr>
         <tr>
                    <td valign=top><font size="-1"><b>Comments/Color:</b> </font></td>
                    <td><input type=text name=comments_color size=8 value='<%=CommentsColor_text%>'><b>%</b></td>
            </tr>
         <tr>
              <td colspan=2><hr width=100%></td>
         </tr>
         <tr>
              <td colspan=2>     <input type="submit" name="update" value="Update Record"
                        style='width:100px;font:9px verdana;'>
         <% if (CID != 0) { %>
                            <input type="submit" name="delete" value="Delete Record"
                                    onclick="return confirm('Are you sure you want to delete this record?');"
                                    style='width:100px;font:9px verdana;'>
            <% } %>
                   <input type="button" name="close" value="Close Window"
                        style='width:100px;font:9px verdana;'
                   onclick='javascript:window.close();'>
              </td>
         </tr>
    </table>
    </td>
    </tr>
    </table>
    <input type=hidden name=login_id value=<%= request.getParameter("login_id") %>>
    <input type=hidden name=cid value=<%=CID%>>
    <SCRIPT LANGUAGE="JavaScript">
    opener.myform.submit();
    </SCRIPT>
    </form>
    </body>
    </html>thats my code for part of database, in the parts that go "if CID = 0", thats the new record field, in there right now i just have users put in info into blank input fields, however, i would like to know if i can make certain fields, like Mraketer, and Counterparty fields to have drop down menus, Anyone know??

    So basically the main focus of what I was askin is in this block of code below:
    if (CID == 0) {
              // Do the insert via a PreparedStatement
              java.sql.PreparedStatement ps = null;
              ps = db.prepareStatement("insert into hit_or_miss values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
              ps.setInt(1, nID);
              ps.setString(2, DE);
              ps.setString(3, SI);
              ps.setString(4, TT);
              ps.setBigDecimal(5, NTL);
              ps.setString(6, ST);
              ps.setString(7, CP);
              ps.setString(8, ED);
              ps.setString(9, SD);
              ps.setString(10, MD);
              ps.setString(11, CT);
              ps.setString(12, MRKTR);
              ps.setBigDecimal(13, SC);
              ps.setBigDecimal(14, MP);
              ps.setString(15, CC);
              ps.executeUpdate();
              out.print("<font color=darkblue>The new record has been inserted into the database successfully</font>");
         } else {
              // Do the update via a PreparedStatement
              // First we insert a row into the archive table
                 java.sql.PreparedStatement ps = null;
                    ps = db.prepareStatement("update hit_or_miss set date_entered = getdate(), summit_ID = ?, transaction_type = ?, notional = ?, structure = ?, counterparty = ?, expiry_date = ?, start_date = ?, maturity_date = ?, currency_type = ?, marketer = ?, sales_credit = ?, markup = ?, comments_color = ? where hom_ID ="+CID+" ");
              ps.setString(1, DE);
              ps.setString(2, SI);
              ps.setString(3, TT);
              ps.setBigDecimal(4, NTL);
              ps.setString(5, ST);
              ps.setString(6, CP);
              ps.setString(7, ED);
              ps.setString(8, SD);
              ps.setString(9, MD);
              ps.setString(10, CT);
              ps.setString(11, MRKTR);
              ps.setBigDecimal(12, SC);
              ps.setBigDecimal(13, MP);
              ps.setString(14, CC);
              ps.executeUpdate();
              out.print("<font color=darkblue>This record has been updated successfully</font>");
         }     when CID = 0, what it does is it pops up a new window called "New Record" and in this new window, there are boxes where inputs can be made, so that when u hit submit, it submits into the database.
    What I want to do is, for example, there is a input field called "Marketer" where one can type in his own name as the Marketer, I want make this into a drop down box, where you can pick the marketer, and not have to type it in.
    You know how websies have New User, where you create a new user that is added to their database, and usually the COUNTRY field is a drop down menu where you pick the country from. I would like to do that to my database, and this is the area, or the code, that deal w/ new record "IF CID =0" and edit record "ELSE"
    Is this possible?
    Thanks in Advance

  • Code problem - field value derived from drop down values

    I have a drop down with about 6 choices. The user can enter their own amount for "quantity" in the drop down if they don't want to use one of the 6 choices. The code below I've attached to another field on another page of the form. (1) I can enter my own value it displays fine. (2) If I pick the #6 option on the drop down, it displays "3000" as required. The other 5 choices however, display 1, 2, 3, 4, or 5 instead of the actual value - "100", "500" etc....
    Seems to work for one of the 6 choices, but none of the rest.....
    if (form1.orderPage1.stdLayout.quantity.rawValue == "1") {
    this.rawValue = "1000";
    if (form1.orderPage1.stdLayout.quantity.rawValue == "2") {
    this.rawValue = "500";
    if (form1.orderPage1.stdLayout.quantity.rawValue == "3") {
    this.rawValue = "250";
    if (form1.orderPage1.stdLayout.quantity.rawValue == "4") {
    this.rawValue = "2000";
    if (form1.orderPage1.stdLayout.quantity.rawValue == "5") {
    this.rawValue = "2500";
    if (form1.orderPage1.stdLayout.quantity.rawValue == "6") {
    this.rawValue = "3000";
    }else{
    this.rawValue = form1.orderPage1.stdLayout.quantity.rawValue;
    Need to learn more about "else" in Adobe JS....
    As always, any help is greatly appreciated!
    Mike Foster

    Have you read your code? If your quantity value is between "1" and "5" the result value is being set correctly; then for the test for a value of "6", since your quantity value is not "6" you setting the value to the quantity value. Modify your original code to print some flow information to the JavaScirpt console and you see what is happening, be sure to open Acrobat to see the results in the JavaScript console:
    /* original code */
    console.show();
    console.clear();
    console.println("Original");
    if (quantity.rawValue == "1") {
    console.println(1);
    this.rawValue = 1000;
    if (quantity.rawValue == "2") {
    console.println(2);
    this.rawValue = 500;
    if (quantity.rawValue == "3") {
    console.println(3);
    this.rawValue = 250;
    if (quantity.rawValue == "4") {
    console.println(4);
    this.rawValue = 2000;
    if (quantity.rawValue == "5") {
    console.println(5);
    this.rawValue = 2500;
    if (quantity.rawValue == "6") {
    console.println(6);
    this.rawValue = 3000;
    } else { // since quantity != "6" do this
    console.println("Other");
    this.rawValue = quantity.rawValue;
    There are many ways to solve your problem. First you can nest the "if" statements, so the "else" clause is applies to all the previous "if" statements:
    /* using nested if statements */
    console.show();
    console.clear();
    console.println("Nested if then else");
    if (quantity.rawValue == "1") {
    console.println("1");
    this.rawValue = 1000;
    } else {
    if (quantity.rawValue == "2") {
    console.println("2");
    this.rawValue = 500;
    } else {
    if (quantity.rawValue == "3") {
    console.println("3");
    this.rawValue = 250;
    else {
    if (quantity.rawValue == "4") {
    console.println("4");
    this.rawValue = 2000;
    } else {
    if (quantity.rawValue == "5") {
    console.println("5");
    this.rawValue = 2500;
    } else {
    if (quantity.rawValue == "6") {
    console.println("6");
    this.rawValue = 3000;
    } else { // if none of the above
    console.println("Other");
    this.rawValue = quantity.rawValue;
    Next you could not use an else statement at all, just do a final test for any values outside the range of "1" - "6".
    /* quantity not in range */
    console.show();
    console.clear();
    console.println("if quantity < 1 or > 6");
    this.rawValue = null; // empty result field
    if (quantity.rawValue == "1") {
    console.println("1");
    this.rawValue = 1000;
    if (quantity.rawValue == "2") {
    console.println("2");
    this.rawValue = 500;
    if (quantity.rawValue == "3") {
    console.println("3");
    this.rawValue = 250;
    if (quantity.rawValue == "4") {
    console.println("4");
    this.rawValue = 2000;
    if (quantity.rawValue == "5") {
    console.println("5");
    this.rawValue = 2500;
    if (quantity.rawValue == "6") {
    console.println("6");
    this.rawValue = 3000;
    if (quantity.rawValue < 1| quantity.rawValue > 6) { // if quantity value not between 1 and 6
    console.println("Other");
    this.rawValue = quantity.rawValue
    And finally, you can use the "switch" statement to select an action based on the value of the quantity value and ignore the rest of the test. If no test has been selected, then perform the default action.
    /* using switch on quantity value statement */
    console.show();
    console.clear();
    switch (quantity.rawValue) {
    case "1":
    console.println("1");
    this.rawValue = 1000;
    break;
    case "2":
    console.println("2");
    this.rawValue = 500;
    break;
    case "3":
    console.println("3");
    this.rawValue = 250;
    break;
    case "4":
    console.println("4");
    this.rawValue = 2000;
    break;
    case "5":
    console.println("5");
    this.rawValue = 2500;
    break;
    case "6":
    console.println("6");
    this.rawValue = 3000;
    break;
    default: // all other values
    console.println("Other");
    this.rawValue = quantity.rawValue
    break;
    } // end switch quantity

Maybe you are looking for

  • Use a variable for the integer in Fmt offset modifier

    I'm trying to pluck values out of a long array of comma separated string values. I'm doing this within a loop and would like to use the loop interation to point to the starting point in the array. Here's what I have working so far: Fmt (scratch,"%s<%

  • IBook Will Not Automatically Sleep

    Lately I have had a problem with my iBook G4 not automatically going to sleep after the specified period of time. Obviously this is a problem when running on battery power! I usually have it set to sleep after 15 minutes of inactivity to save the bat

  • Network Mode Switch No Longer Possible After Upgrade

    Hello. I can't switch from 3G/H+ to 2G any longer. I could do this when I still had the OS 7.0 running on my Torch 9810 (AT&T). This changed after I upgraded to the OS 7.1. Now, when I go to the "Networks and Connections" option, all I see is "Manual

  • JPasswordField and JButton Problem

    Happy New Year to all of you guys and gals. Here's the problem I have a String Array of buttons made already .. The design and measuring of the buttons are similar to a regular calculator. Now depending on the button that I press I set the text of th

  • Recommendations for cell phone signal boosters

    I have not yet made the jump to an iPhone but would greatly appreciate feedback on what cell phone boosters actually work (having lived for years with about 5% Verizon signal reliability at my home, very good signal most other places -- of course the