Disabling a field when a radiobutton is selected.

Hi,
I have two radio buttons R1  and R2  and three input fields date1,date2 and date3 of which date3 is mandatory. My requirement is when I click on R2 the field date1 needs to be disabled. I am coding the logic at selection-screen output. But since the field date3 is mandatory this logic is calling after the madatory field check only. I want it to call before the mandatory field check.
Any solution?.
Thanks & Regards,
Soumya.

look at this code it may help u
SELECT OPTIONS
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
PARAMETERS: r1 RADIOBUTTON GROUP rad1 MODIF ID sc7 USER-COMMAND cli DEFAULT 'X',
            r2 RADIOBUTTON GROUP rad1 MODIF ID sc6.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_ponum  FOR ekpo-ebeln MODIF ID sc1,   "PURCHASING DOCUMENT NUMBER
                s_prodno FOR afko-aufnr MODIF ID sc2.   "ORDER NUMBER
PARAMETERS
PARAMETERS:     p_chno(8) TYPE c MODIF ID sc4.          "Challan no
SELECT OPTIONS
SELECT-OPTIONS: s_date FOR sy-datum MODIF ID sc5
                              NO INTERVALS NO-EXTENSION.    "Date
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTIONSCREEN OUTPUT
At selection screen if user selects PO then the Prod order will
become dispaly only and if user selects prod order then
the PO field and the challan.no becomes display only.
In both cases the date will be mandatory field.
AT SELECTION-SCREEN OUTPUT.
  IF r2 = 'X'.
   IF NOT s_prodno IS INITIAL.
    LOOP AT SCREEN.
      IF screen-group1 = 'SC1' OR screen-group1 = 'SC4' ."OR screen-group1 = 'SC5'.
        screen-input = '0'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.
  IF r1 = 'X'.
   IF NOT s_ponum IS INITIAL.
    LOOP AT SCREEN.
      IF screen-group1 = 'SC2'.
        screen-input = '0'.
        MODIFY SCREEN.
      ELSEIF screen-group1 = 'SC4' OR screen-group1 = 'SC5'.
         screen-required = '1'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.
reward if useful.
Regards
Dheeraj

Similar Messages

  • Disabling custom fields when Equipment type is M

    Hi all,
    I modified the IE02 transaction by adding 5 custom fields
    to the screen SAPLITO0 1050.
    Now i have the requirement to disable these fields when eqtyp is 'M'.
    Is there any userexit available for this purpose or i have to modify the PBO module of the screen.
    Any help will be appreciated.
    regards
    chandu.

    Hi Sai,
    Did you place your PBO module in the screen 1022's flow
    logic? The PBO logic should some what like following,
    general dynpro settings
      MODULE DYNPRO_INIT_SUB_ALL.
    specific dynpro settings
      MODULE DYNPRO_INIT_1022.   "This is your module here..
    restore active cursor position and set it
      MODULE DYNPRO_CURSOR_SET.
    And then in the PBO Module DYNPRO_INIT_1022 (which I assume is created in the include LIO0O01),
    MODULE DYNPRO_INIT_1022 OUTPUT.
    ****Your screen modification logic here..
    ENDMODULE.
    Also did you activate/generate both the screen and program?
    Please check that as well.
    When you debug put a break-point in your PBO module and see whether the control goes there..
    Hope this helps..
    Also if possible could you give me the detailed steps that you have followed? (In case it doesnt workout after checking every thing)
    Sri

  • Dropdown field - when certain entries are selected make another field unavailable for data input

    Hi All,
    Sorry one again I am very new to forms and have another question. I have a dropdown list which when selecting certain values I need another field to be unavailable so the user can't enter data.
    Hope this example makes sense:
    DropDown
    Field %
    Outer
    Not Allowed to enter data
    Back
    Not Allowed to enter data
    Inner
    Not Allowed to enter data
    Cotton
    Allowed to enter data
    Wool
    Allowed to enter data
    If someone could give me some examples that would be a great help.
    Many Thanks
    Adam Sadler

    Here's a script that you can use for the custom Validate script of the dropdown. It resets the value of the corresponding text field whenever a change is made to the dropdown. You can get rid of the line that does this if you don't want this to happen. Change "text1" in the code to match the name of the text field you're using.
    // Custom Validate script for dropdown
    (function () {
        // Get the selected value
        var v = event.value;
        // Set up an object to associate read-only status of text field with items
        var f_state = {
            "Outer": true,
            "Back": true,
            "Inner": true,
            "Cotton": false,
            "Wool": false
        // Get a reference to the text field
        var f = getField("text1");
        // Clear the text field
        f.value = "";
        // Set the read-only status of the text field based on what's selected
        if (v in f_state) {
            f.readonly = f_state[v];

  • Disabling a field when editing a user

    Hi,
    I have a form in which I want to disbale a field if I am in editing mode. But I want it enabled when I create a user. Anyone know how to achieve this?
    thanks

    I think that when the user has not been created yet in IDM, the waveset.id does not exist. so you are in creation mode.
    but when you're editing a user, the user exists in IDM and thus has a wavest.id.
    really basic but works fine !

  • Disabling the fields

    Hi All,
      How can i disable the fields when i press on Display button, the data shud be retrieved but the fields shud be in display mode only.
      waiting for ur reply.
    Thanx  & Regards
    Srinath

    You need to loop at screen and modify the attirbutes of the screen structure. Do this in the PBO and before doing this , check if the transaction is in Display mode or Change mode.
    if display_mode = 'X'.  "Variable set depending on the transaction
    Loop at screen
      screen-input = 0.
      screen-active = '0'.
    modify screen.
    endloop.
    endif.
    regards,
    Advait.

  • Populate text field based on the lov selected value

    Hi,
    based on the value selected in lov, i want to populate another text field. Below is the code I have written
    In PFR:
    if(pageContext.isLovEvent())
    String lovInputSourceId = pageContext.getParameter(SOURCE_PARAM);
    if ("lovCategory".equals(lovInputSourceId))
    java.util.Hashtable lovResults = pageContext.getLovResultsFromSession(lovInputSourceId);
    if(lovResults!=null)
    String value =(String)lovResults.get("lovCategory");
    amobj.categorycode(value);
    AMImpl code:
    public void categorycode(String code) {
    sundryCodeVOImpl vobj = getsundryCodeVO1();
    vobj.setWhereClause( "lookup_code = "+"'"+code+"'");
    vobj.reset();
    vobj.executeQuery();
    String desc = vobj.first().getAttribute("Description").toString();
    String attr = vobj.first().getAttribute("Attribute1").toString();
    testEOViewImpl vobj1 = gettestEOView1();
    vobj1.getCurrentRow().setAttribute("CodeDescription",desc);
    vobj1.getCurrentRow().setAttribute("PurchasingCategoryCd",attr);
    vobj1.executeQuery();
    With this code, the updated values for the attributes CodeDescription, PurchasingCategoryCd are getting inserted into the database table but they are now showing up in the text fields when a value is selected in lov.
    Please tell me what is the mistake I'm doing.
    Thanks
    Sunny

    I'm using Lov Map to populate the lov field say field A. But I need to populate another field say field B based on the value selected in field A.
    to give an example of my requirement. Consider a view object having attributes col1,col2,col3 and having following data.
    col1--col2--col3
    1-----a-------x
    2-----b------y
    3-----c------z
    I 'll populate the lov of field A with values in col1. when user selects value 1 in field A. automatically field B should show value 'a'. If user selects value 2 in field A, field B should show value 'b' so on.
    Thanks
    Sunny

  • Disable screen fields

    I required help to disable screen fields when User command runs in PBI not in case of PBO. Pl. help.
    vikas

    Hi,
    PBI? assuming PAI...
    u can disable filed useing :
    loop at screen.
    if screen-name = '<ur_fld_name>'.
    screen-input = 1. "or may be 0
    modify screen.
    endif.
    endloop.
    Jogdand M B

  • How to disable a field on the basis radio button value selected.

    hello to all,
    i am facing one problem.I have declared two selection screen blocks.
    In one i hvae declared two radio button r1 -Fiscal year and r2--Datewise.
    And in another selection screen block all i/p fields. like plant. date.year etc.
    Now if user select r1-Fiscal year  then i/p field - date of second block should be disable.
    And if user select r2-Datewise  then i/p field - year of second block should be disable.
    SELECTION-SCREEN BEGIN OF BLOCK BLK WITH FRAME
              TITLE TEXT-002.
           PARAMETERS: R1 RADIOBUTTON GROUP RA1 user-command ucomm,
                       R2 RADIOBUTTON GROUP RA1 DEFAULT 'X'.
       SELECTION-SCREEN END OF BLOCK  BLK.
    selection-screen begin of block b1 with
      frame title text-001.
    parameters : gjahr like ZSA_DETAIL-gjahr  MODIF ID YAR,
                 aedat like ZSA_DETAIL-aedat  MODIF ID DAT,
                 werks like ZSA_DETAIL-werks .
    selection-screen end of block b1.
    AT SELECTION-SCREEN on RADIOBUTTON GROUP RA1.
       BREAK-POINT.
        IF R1 = 'X'. "fiscal
         LOOP AT SCREEN.
            IF screen-group1 = 'DAT'.
             screen-active = 0.
             screen-invisible = 1.
             MODIFY SCREEN.
             ENDIF.
            endloop.
       ELSEIF R2 = 'X'.
         LOOP AT SCREEN.
         IF screen-group1 = 'YAR'.
           screen-active = 0.
          MODIFY SCREEN.
         ENDIF.
         ENDLOOP.
        ENDIF.

    Hi Shikha,
    Regarding your query, when you select a particular radio-button then the fields pertaining to that radio-button should get activated or get displayed, otherwise it should be hidden.
    This can be done adding the addition to the Radiobutton 'USER-COMMAND' this will automatically enable-up
    the functionality of the fields related to that radiobutton, while disabling the others.
    If USER-COMMAND isn't given, then ENTER key serves the purpose.
    DATA:
    w_carrid LIKE sflight-carrid,
    w_connid LIKE sflight-connid.
    PARAMETERS:
    p_carrid RADIOBUTTON GROUP airl USER-COMMAND airline,
    p_connid RADIOBUTTON GROUP airl.
    SELECT-OPTIONS:
    s_carrid FOR w_carrid,
    s_connid FOR w_connid.
    INITIALIZATION.
    p_carrid = 'X'.
    Now enabling desired fields and disabling the others, can be done by the following snippet.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF p_carrid EQ 'X'.
    IF screen-name CS 'S_CONNID'.
    screen-active = 0. " Disable the field S_CONNID
    MODIFY SCREEN.
    ELSEIF screen-name CS 'S_CARRID'.
    screen-active = 1. " Enable the field S_CARRID
    MODIFY SCREEN.
    ENDIF.
    ELSEIF p_connid EQ 'X'.
    IF screen-name CS 'S_CARRID'.
    screen-active = 0.
    MODIFY SCREEN.
    ELSEIF screen-name CS 'S_CONNID'.
    screen-active = 1.
    MODIFY SCREEN.
    ENDIF.
    ENDIF.
    ENDLOOP.
    Hope, this would help you solve your problem.
    Thankyou,
    Zahack.

  • To suppress certain fields based on radiobutton selection

    hi experts,
    I am having the requirement that on selection of presentation server(radio button) i need to suppress some fields like file path and name in application server(radio button) which are mandatory when application server is selected.
    Now my problem is if I leave the fields in application server blank and select presentation server then it is asking to fill in all required fields.
    Here is the code i am using:
    Selection Screen                                                    *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t08.
    *FOR APPLICATION SERVER FILE
    PARAMETERS: po_appln RADIOBUTTON GROUP rad1 DEFAULT 'X' USER-COMMAND upload,
                po_ipath TYPE filepath-pathintern  OBLIGATORY MODIF ID app,
                po_ifile TYPE rlgrap-filename       OBLIGATORY MODIF ID app.
    SELECTION-SCREEN SKIP 1.
    *FOR PRESENTATION SERVER FILE
    PARAMETERS: po_dsktp RADIOBUTTON GROUP rad1,
                po_dfile TYPE rlgrap-filename     OBLIGATORY MODIF ID prn.
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN OUTPUT.
      PERFORM modify_screen.
    form MODIFY_SCREEN .
    *When application server radio button is checked
      LOOP AT SCREEN.
        IF po_appln EQ  'X' AND screen-group1 EQ 'PRN'.
          screen-output = '0'.
          screen-active = '0'.
          screen-input  = '0'.
        ENDIF.
        IF po_appln EQ  'X' AND screen-group1 EQ 'APP'.
          screen-input  = '1'.
        ENDIF.
    *When presentation server radio button is checked
        IF po_dsktp EQ 'X' AND screen-group1 EQ 'APP'.
          screen-output = '0'.
          screen-active = '0'.
          screen-input  = '0'.
        ENDIF.
        IF po_dsktp EQ 'X' AND screen-group1 EQ 'PRN'.
          screen-input  = '1'.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    endform.         
    Can some one please help me

    Hi,
    Remove the obligatory extension in the selection-screen. Then the mandatory check will not be done when you select the radio-button.
    To handle the mandatory check of the path and file, do the checking in the event 'AT SELECTION-SCREEN'
    if sscrfields-ucomm = 'ONLI'. (Declare TABLES: SSCRFIELDS in the data declarations)
    if ipath is initial.
    message E001(z...)  with 'Please enter a file path'.
    endif.
    Regards,
    Vidya Chowdhary A.

  • Disabling certain fields on the selection screen.

    Hi all,
              I want to disable certain fields on selection screen of my program, also i want to display certain fields on selection screen only if a particular field on the selection screen is checked or selected. Please guide me how this can be achieved via coding in a program.
    Thanks & regards,
    Chetan.

    Hi Chetan,
    try this.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: pa_file TYPE rlgrap-filename MODIF ID abc,
    pa_lifnr TYPE lfa1-lifnr MODIF ID abc,
    pa_vkorg TYPE vbak-vkorg MODIF ID abc.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS: pa_kunnr TYPE vbak-kunnr MODIF ID def.
    SELECT-OPTIONS: s_lifnr FOR gs_lfa1-lifnr MODIF ID def,
    s_date FOR gs_lfa1-erdat MODIF ID def,
    s_augru FOR gs_vbak-augru MODIF ID def,
    s_vbeln FOR gs_vbak-vbeln MODIF ID def.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pa_upd RADIOBUTTON GROUP g1 USER-COMMAND uc01 DEFAULT 'X'."#EC *
    SELECTION-SCREEN COMMENT 3(60) text-004 FOR FIELD pa_upd.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pa_rep RADIOBUTTON GROUP g1 ."#EC *
    SELECTION-SCREEN COMMENT 3(60) text-005 FOR FIELD pa_rep.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b3.
    IF pa_rep EQ gc_x.
    LOOP AT SCREEN.
    IF screen-group1 = gc_abc.
    screen-input = gc_zero_num.
    ELSEIF screen-group1 = gc_def.
    screen-active = gc_one_num.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    ELSEIF pa_upd EQ gc_x.
    *For Reprocessing
    LOOP AT SCREEN.
    IF screen-group1 = gc_def.
    screen-input = gc_zero_num.
    ELSEIF screen-group1 = gc_abc.
    screen-active = gc_one_num.
    ENDIF.
    MODIFY SCREEN.
    CLEAR pa_upd.
    ENDLOOP.
    ENDIF.
    REPORT zrich_001.
    PARAMETERS: p_rad1 RADIOBUTTON GROUP grp1 DEFAULT 'X'
    user-command chk,
    p_rad2 RADIOBUTTON GROUP grp1.
    SELECT-OPTIONS: s_datum1 FOR sy-datum MODIF ID d1,
    s_datum2 FOR sy-datum MODIF ID d2.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF p_rad1 = 'X'
    AND screen-group1 = 'D2'.
    screen-active = '0'.
    ENDIF.
    IF p_rad2 = 'X'
    AND screen-group1 = 'D1'.
    screen-active = '0'.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    reward if useful.
    regards,
    sravanthi.

  • Make fields active on radiobutton selection

    Hello all,
    I have two radiobuttons and two fields.When I select first radiobutton, field1 should be active and when I select second radiobutton field2 should be active.I am able to achieve this using at selection screen output event.But the problem is that when I select first radiobutton, field1 should be mandatory and if I switch to second radiobutton from the first one, field2 should be mandatory. When I switch from radiobutton 1 to radiobutton 2, the validation for the field2 is kicked off even before the field is avaiable for input.How to achieve this?
    Thanks
    Sandeep

    hi ,
    *& Report  ZVENKATTEST0
    REPORT  ZVENKATTEST0.
    TABLES:MARA.
    SELECT-OPTIONS:S_TEST1 FOR MARA-MATNR MODIF ID M1 ,
                   S_TEST2 FOR MARA-MEINS MODIF ID M2 .
    PARAMETERS:P_RAD1 RADIOBUTTON  GROUP G1 USER-COMMAND UC1 DEFAULT 'X',
               P_RAD2 RADIOBUTTON GROUP G1 ,
               P_RAD3 RADIOBUTTON GROUP G1 .
    AT SELECTION-SCREEN OUTPUT .
      LOOP AT SCREEN.
        IF P_RAD1 = 'X'.
          IF SCREEN-NAME = 'S_TEST1-LOW' .
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
          ENDIF.
          IF SCREEN-NAME = 'S_TEST1-HIGH' .
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
          ENDIF.
          IF SCREEN-NAME = 'S_TEST2-LOW' .
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
          ENDIF.
          IF SCREEN-NAME = 'S_TEST2-HIGH' .
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
          ENDIF.
       ENDIF.
          IF P_RAD2 = 'X'.
            IF SCREEN-NAME = 'S_TEST1-LOW' .
              SCREEN-INPUT = '0'.
              MODIFY SCREEN.
            ENDIF.
            IF SCREEN-NAME = 'S_TEST1-HIGH' .
              SCREEN-INPUT = '0'.
              MODIFY SCREEN.
            ENDIF.
          ENDIF.
            IF P_RAD3 = 'X'.
              IF SCREEN-NAME = 'S_TEST2-LOW' .
                SCREEN-INPUT = '0'.
                MODIFY SCREEN.
              ENDIF.
              IF SCREEN-NAME = 'S_TEST2-HIGH' .
                SCREEN-INPUT = '0'.
                MODIFY SCREEN.
              ENDIF.
            ENDIF.
         ENDLOOP.
    regards,
    venkat.

  • Error: Show Details cannot be executed when multiple items are selected in a report filter field or in a slicer

    I have connected TABULAR Model to Excel, and in the pivot the filter is on multiple dimensions. When doing the drillthrough action it gives error - Error: Show Details cannot be executed when multiple items are selected in a report filter field or in a slicer
    Is there any workaround to this error?  so that drillthrough can be done even with multiple selection.

    Hi Vikas,
    The reason behind the error message requires the knowledge on what happens at the backend. When you perform a drill-through action, a query is sent to Analysis Services. This query is expressed in a query language called Multi-Dimensional Expression (MDX).
    Since the MDX language doesnot support drill-through command against a set (collection of tuples) an error is persisted. 
    For now, there is no workaround as it is a limitation of the underlying language that is generating the query.
    When multiple items are selected you lose the ability to drill-down on individual metrics. To resolve you must either:
    1. Select a single Item.
    2. Select all items.
    Hope this helps!
    Please mark as Answer if this helps! Thanks, Rajasekhar.

  • Text Area steals Focus from Text Field when selected with mouse

    I have created a very simple form with 4 spry validation elements here :: http://octopusdesign.net/contactus.html
    When I attempt to select the 'Your Email' text field using the mouse, focus is grabbed by the text area above it.
    It is only possible to get focus on the 'Your Email' text field by using tab.
    My best guess is that this is a bug in the framework.
    In addition to updating my spry libraries to 1.6 from 1.4 I've tried the following things::
    Reordering the elements in the form.
    Creating the elements in a different order.
    Replacing the validation elements with ordinary elements.
    None of these fixed the problem.
    Strangely, if I remove the validation text area there is no problem.
    If anyone can shed some light on this I would really appreciate it.
    Wisdom gratefully received.
    Chris

    Furthermore ::
    I've tried to reconstruct the form from scratch and discovered that if you have a validation text field and a validation text area in any order on the form, selecting the 2nd element with the mouse always results in the first element stealing the focus.

  • No select all text in text field when I mouse in

    Hello
    How can I go to next row in a multi-text field when I point my mouse in?
    That is, I don't want (when I fire in) have all text select but i want write soon, otherwise as soon as i begin to write all text inserted in it is deleted
    Thanks

    HI user560737,
    After over 170 post still
    a. No Forms version
    b. No friendly handle
    c. Inadequate and incomprehensible description
    Perhaps one or more of the following are true
    1. Members of this forum are not equipped to help you.( So, why bother to post?)
    2. You are not appreciative of the help being extended to you, in the form of marking posts helpful / correct
    3. You do not articulate and follow through on your post.
    How else can one explain
    Handle:      user560737 Status Level:      Newbie
    Registered:      Feb 24, 2007
    Total Posts:      171
    Total Questions:      37 (35 unresolved) >
    How can I go to next row in a <b>multi-text field</b> when I point my mouse in?That is, I don't want <b>(when I fire in)</b> have all text select but i want write soon, otherwise as soon as i begin to write all text inserted in it is deleted

  • Show/hide fields when selecting an option from a drop-down menu.

    Hello Gurus!
    I have a question about creating a Java Script withing Acrobat pro.  This is what i would like to do: I created a drop-down menu with several selection entries.  Upon the customer making one of the selection entries, i would like for the correct fields that i created to become visible and all other fields to hide.  Is this even possible to do?  The reasoning behind this is because we have a form that customers have to generate in order to request access to certain financial accounts; we have over 20 different types of accounts and for each instance the customer has to fill out the same form.  By creating a drop down menu, i can use the same form by just changing the drop-down selection and clicking on the designated fields for that selection.  At this time i have over 20 different forms that poing to 20 different account requests and i would hate to send the form 20 different times to one person.  The reason i can not add all fields desired for all accounts is due to the fact that the form would be filled with hundreds of checkmarks and instructions thus making the process too tideous for the customer.  Hope you guys can help out.
    ~Vader

    The good news is, it can be done (and it has been done).
    There are a few things to be aware of, however.
    The most important is that the form must be planned well, which means that you must think carefully about your logic and even more so about your field naming (hierarchical field names are your friend). One fundamental issue, you have to be aware of, is that this form no longer will be a "standard form". The consequence of this is that you may have to be aware that you might get into trouble when you have to prove that your user filled out that particular standard form (talk to your compliance and forms management people about that).
    You also may have to decide whether the form should be usable in Reader. And, if so, how much you want to spend on the right to do so. You will see below why…
    There are actually two approaches for dynamically showing/hiding parts of a form. If your form can be separated between a fixed first page (where you also have the account type selection), and a variable part (depending on the selection), you could use Templates, which you spawn according to the selection, and delete pages when you change the selection. This approach is very easy to implement, but requires Reader Extensions Server to allow it to work in Reader; Acrobat Pro's extended rights are not sufficient for that.
    The other approach is showing/hiding fields. If you did your homework well, it would be very easy to first hide all subsequent fields, and then show the ones you need in two lines of code. This approach does not require extended rights for Reader at all, as long as your forms will always have the same number of pages, for each of your account types. This approach also works for the cases where the differences between the individual forms are very small. It does also work for showing/hiding bigger chunks of the form. In that case, you might create the "background" separately, and then put it as an icon into a button field which you will show/hide together with the carefully placed on top of it active fill-out fields.
    There is a third possibility, which Adobe Propaganda probably would suggest, and that woudl be subforms in LiveCycle Designer. The consequence is, however, that you won't have PDF forms, but proprietary XFA forms instead. And you may have more developing and maintenance work than with the other approaches.
    Back to your original question: you could use a Keystroke script evaluating event.changeEx of the combo box field. Depending on that, you would run your action to set up the according form part. The other way to do it would be evaluating event.value in the onBlur event. The latter would have the advantage that the selection has been made, and you get a bit more time to set up the form (this may in fact be an issue, particularly with Acrobat 9 and 10, which may take their time to show/hide fields).
    Another possibility instead of a drop down (combo box field) would be a popup, where you would have a button to press, and the list of selections pops up. This second method uses app.popUpMenuEx().
    Hope this can help.
    Max Wyss.

Maybe you are looking for