Make a mandatory field if the selection is made

Nice day.

I'm trying to figure out how to mark a required field if a user selects an option.

What I have.

I was the shape of the 3 page design. On the first page, there are a number of options by selecting 1 or all 4 of the checkboxes the user can select.

If a user selects a check box next to 2 specific options (out of many), I have a text box that must serve as justification.

What I want to do is;

If a user selects a checkboxes next to 1 or both of 2 specific options, I want the text box to become a required field.

With a little luck I explained this correctly.

Concerning

Chomp

Also make sure that the language drop is set to JavaScript and FormCalc

Tags: Adobe LiveCycle

Similar Questions

  • Make a mandatory field if the selection is made in the drop-down list

    Hello

    Does anyone know how to make a field optional mandatory change based on a selection made in a drop down list?

    For example, I have a combo that has option 1-3, and I have a hidden field that is optional. When option 3 is chosen the hidden field is visible, but I also want to be required before a the form submission is possible.

    Thanks in advance for any idea!

    You can place this code in your event out of you in the drop-down list... Just change TextField1 your domain name and make sure that the language is set to JavaScript:

    If (this.selectedIndex == 2) {}

    TextField1.presence = "visible";

    TextField1.mandatory = "error";

    TextField1.mandatoryMessage = ' this field is required ".

    }

    else {}

    TextField1.presence = 'hidden ';

    TextField1.mandatory = "disabled";

    }

  • [JDev12c, ADF] How to get the value of a field from the selected line in af:table and...

    Hallo,

    I want to double click on a line of an af:table to call a page that displays a form (based on a View object) with the details of the selected line.

    I need to go to the second page the value of a field on the line that is selected on the first page.

    How can I do this? In particular, how can I get the value of a field from the selected line? How can I call the second page on double-click on the af line: table?

    Thank you

    F.

    Why would user, you need to pass a value of the line to the shape?

    The framework selects the line you want to display in the form. All you have to do is to show the form with the selected line. It is the framework automatically as long as you use e vo even the same data control.

    Timo

    Post edited by: Timo Hahn
    And the handling double-clicks is described here http://www.oracle.com/technetwork/developer-tools/adf/learnmore/56-handle-doubleclick-in-table-170924.pdf

  • [ADF, JDev12.1.3] SelectOneChoiche created from VO instance with 3 fields: how to retrieve the value of all the fields of the selected element?

    Hallo,

    I defined a VO with 3 fields (A, B and C) and I would like to create a SelectOneChoiche that shows only the field as options from this instance of VO.

    In a managed bean, I need to retrieve the values for all areas (A, B and C) of the item selected by the user.

    I started dragging the entire VO instance to UI to create a SelectOneChoiche (in which I have chosen to show only the to field).

    Then, I created a for the SOC ValueChangeListener read the values A, B and C of the selected element, but the only thing I've done is to get the displayed value:

    System.out.println((String) ((RichSelectOneChoice) FacesUtils.findComponent("MySoc")).getValue());
    

    You kindly help me?

    Thank you

    Federico

    Federico, sorry I didn't see your answer.

    As you use 12.1.3 you can do this more easily than the code that I posted before. You can use

    {} public void onCountrySelection (ValueChangeEvent valueChangeEvent)

    FacesContext will involve = FacesContext.getCurrentInstance ();

    Make sure that the selection change is processed and the current link lov line has the new selected line

    valueChangeEvent.getComponent () .processUpdates (contxt);

    BindingContext lBindingContext = BindingContext.getCurrent ();

    BindingContainer lBindingContainer = lBindingContext.getCurrentBindingsEntry ();

    List JUCtrlListBinding = lBindingContainer.get ("CountryId") (JUCtrlListBinding);

    the newindex in not necessary, but ok let's get it (must be equal to the CountryId, the pharmacokinetics of the binding of the lov

    String newindex = (String) valueChangeEvent.getNewValue ();

    get the selected value in the list that is the selected line of the binding of the lov

    Line lFromList = list.getSelectedValue () (line);

    now, we can get the attributes of the line of lov

    String s = (String) lFromList.getAttribute ("CountryId");

    System.out.println ("CountryId:" + s);

    String s2 = (String) lFromList.getAttribute ("CountryName");

    System.out.println ("CountryName:" + s2);

    BigDecimal s3 = lFromList.getAttribute("RegionId") (BigDecimal);

    System.out.println ("RegionId:" + s3.toString ());

    }

    The form that I use is based on the location of the HR DB schema table. The CountryId is configured in the view object to display a lov based on the campagneVoir. This view contains thre CountryId, CountryName and RegionId attributes.

    If you want to get to the attributes of an action listener you can use this code

    {} public void onGetSelectedCountryLov (ActionEvent actionEvent)

    BindingContext lBindingContext = BindingContext.getCurrent ();

    BindingContainer lBindingContainer = lBindingContext.getCurrentBindingsEntry ();

    List JUCtrlListBinding = lBindingContainer.get ("CountryId") (JUCtrlListBinding);

    get the selected value in the list that is the selected line of the binding of the lov

    Line lFromList = list.getSelectedValue () (line);

    now, we can get the attributes of the line of lov

    String s = (String) lFromList.getAttribute ("CountryId");

    System.out.println ("CountryId:" + s);

    String s2 = (String) lFromList.getAttribute ("CountryName");

    System.out.println ("CountryName:" + s2);

    BigDecimal s3 = lFromList.getAttribute("RegionId") (BigDecimal);

    System.out.println ("RegionId:" + s3.toString ());

    }

    You must add the valueChangeListener and at least add the lines

    FacesContext will involve = FacesContext.getCurrentInstance ();

    Make sure that the selection change is processed and the current link lov line has the new selected line

    valueChangeEvent.getComponent () .processUpdates (contxt);

    to ensure that the selected line is available when you click the button.

    And set autosubmit'= true for the field in the UI that displays the LOV.

    Timo

  • Show alert window when the selection is made in menu drop-down (or when the text field is filled)

    I'm a JavaScript novice writer and need help a warning window that meets the programming user selection form a menu drop-down.

    If the user selects any option except the default choice (which is just an empty space), I want an alert is displayed.  If the user is moving through this area without changing the default value, nothing should happen.

    I have a script attached to the "blur" event for the dropdown menu, but it appears each time you tab in this area, of course.  I don't know how to tell him to display the alert if and only if the user has changed the selection.

    Similarly, I have another field which is a simple text field.  If the user types anything in this area, I would like another alert window pops up.  The thing from the drop-down list seems a little more difficult, so if anyone can help me get that squared away, I can probably understand how to program the alert text field.

    In fact, it's the same code for both types of fields:

    If (event.target.value! = event.target.defaultValue) app.alert ("your message");

  • How to make a mandatory KFF on the page of the OPS?

    Hello gurus,

    I'm making a mandatory KFF by extending a controller. While I get the handle of the KFF, kff.setRequired ("yes") does not work. Here is the code in my controller

    Revenue and freight on the page account Site Business purpose are required
    Page: / oracle/apps/ar/cusstd/busPurDetails/webui/ArActSiteBusPurPG

    OA Framework version: 12.1.3


    Revenue OAKeyFlexBean = (OAKeyFlexBean) oawebbean.findIndexedChildRecursive ("reveFF");
    oapagecontext.writeDiagnostics(this,"revenue***"+revenue,2); I can see the object printed in diagnostics which means I've got the handle of it
    revenue.setRequired ("yes");

    Freight OAKeyFlexBean = (OAKeyFlexBean) oawebbean.findIndexedChildRecursive ("freiFF");
    oapagecontext.writeDiagnostics(this,"freight***"+freight,2);
    freight.setRequired ("yes");

    Any help for the resolution of this problem will be greatly appreciated.

    Thanks in advance.

    I've worked on similar requirements, to account revenues required field in the site use the creation page.

    ' Public Sub processFormRequest (pageContext OAPageContext, OAWebBean webBean)
    {
    If (pageContext.getParameter ("apply")! = null)
    {
    OAApplicationModule am = pageContext.getApplicationModule (webBean);
    OAViewObject = accountsViewObject
    (OAViewObject) am.findViewObject ("ArBusPurAllVO");

    If (accountsViewObject! = null)
    {
    OARow line = accountsViewObject.getCurrentRow ((OARow));
    If (row.getAttribute ("GlIdRev") == null: row.getAttribute("GlIdRev").equals(""))

    {
    throw new OAException ("Please enter a revenue account for the Bill at the location.", OAException.ERROR);
    }
    }
    }
    super.processFormRequest (pageContext, webBean);
    }
    }

  • When we change the non-mandatory field in the form, it is not updated

    Hello... I have a question here...

    If I required fields in a custom form, and when I ask the form and change the value in the non-mandatory field and click on save, then it does not save. It is said ' no changes to save "." But it is not the same for the non-compulsory fields.

    Can you please suggest me?

    -vrdida

    If you have an element with an assigned LoV it much difference if you change the value of points (assuming that you have either the property 'Validate list', the value yes or you have a WHEN-VALIDATE-POINT-trigger who performs the search ID fk of the given text) or if you visit the 'empty' field, or NULL. In this case, you must create a WHEN-VALIDATE-trigger POINT on the element, which "cleans" the Fk - id as

    IF :BLOCK.LOKUP_ITEM IS NULL THEN
      :BLOCK.FK_ID:=NULL;
    eNd IF;
    
  • Fill in the text fields of the select list

    I have a select list when selected will fill two text fields with values based on the SQL query

    For example. The selection list is for empno and meets ename and sal in two different fields.

    I looked at the example of the Dene http://htmldb.oracle.com/pls/otn/f?p=31517:42 it's very good, but the only problem I do face is how to fill in several fields.

    Any help will be appreciated.

    ZRH

    Hello

    It would depend where SAL data. If it's on your page, then you could probably do something with javascript. If this isn't the case, you will need to do some Ajax to retrieve the value of the database. Take a look on: http://htmldb.oracle.com/pls/otn/f?p=31517:80

    Your select list can include the ENAME and SAL and your javascript values existing would then just divide the data into two parts and insert them into the appropriate fields.

    Andy

  • How to make a good UI for the selection of the channels with DAQmx

    A lot of my Labview programming accompanied verisons them previous LabVIEW (pre Labview 7), and there are a ton of new features I am digesting (currently using Labview 8.2).

    My question is (in general), how people schedule their user interface for the selection of channels and others when using hardware DAQmx?  What I have in mind is a system compacDAQ with a number of modules.  The user would be able to choose which channels to watch.  With the help of MAX as part of this process seems counter intuative and somewhat static (yes I know you can change out there, but it feels more like something you would use for something that doesn't really change much).  I wish that all the UI within the VI.

    Programmers use the task of creating screw for this or something else?

    Thanks in advance.

    ChuckNRC,

    I tend to avoid using MAX and create all my channels/tasks using the DAQmx functions.  There are also having some DAQmx features that allow you to save/remove channels, tasks and scales to MAX.

  • How to have drop down menu in which we cannot continue until the selection is made

    Hi all

    I have a case in which I have 4 menu drop down and a button to continue, I want to make sure that a user cannot continue until the choice is made on all or at least some of the drop-down list. How can I do that.

    Not get stuck at all!  the button is "disabled" because it is what it is made also.

    That fixed, it must be "enabled".

    Hmmmm... looking at the source code we can easily see who wrote this bug in the first place.  Shhh... don't tell on me.

  • Show the popup when the selection is made on SelectOneChoice

    Hello genius!
    I'm back with another question. = D
    With the help of Jdeveloper 11 g Release 1.

    I'm showing a popup when a value is selected on a selectOneChoice component. I tried to use showPopupBehavior, but it looks like you can use that on a selectOneChoice... it works of course if I have a button, but I want to get rid of the button and just show popup when a selection is made on the selectOneChoice.

    Suggestions, ideas?

    Hello

    (1) set autoSubmit = true for the SelectOneChoice element, then create a method of valueChangeListener for the selectOneChoice.
    (2) in the valueChangeListener method, the popup can be demonstrated using the examples
    http://www.adftips.com/2010/10/ADF-UI-popuputil-class-to-show-or-hide.html

    Thank you
    Nini

  • Function group with CLOB fields in the Select statement

    I try to query our following sql database. Remove the Clob (a.description) field I managed. But I need the Clob (a.description) field. Here is my sql class
    select  a.id_number, a.id_owner,  MAX (n.next_action_required)
                KEEP (DENSE_RANK LAST ORDER BY n.modified_date),
             MAX (n.modified_date) KEEP (DENSE_RANK LAST ORDER BY n.modified_date) 
    from table1 a, table2 n
    where a.id_number = n.id_number
    group by a.id_number, a.id_owner
    I tried the following which works sometimes, but not always because the Clob field length (a.description) varies; anywhere from 10 characters up to 12 000 characters. I get a few drafts with the following and some where the text is cut off. I can not write the correct dbms_lob.substr function.
    select  a.id_number, a.id_owner,  MAX (n.next_action_required)
                KEEP (DENSE_RANK LAST ORDER BY n.modified_date),
             MAX (n.modified_date) KEEP (DENSE_RANK LAST ORDER BY n.modified_date) , DBMS_LOB.SUBSTR (a.description, 8001, 10000)
    from table1 a, table2 n
    where a.id_number = n.id_number
    group by a.id_number, a.id_owner, DBMS_LOB.SUBSTR (a.description, 8001, 10000)
    Help, please. Thank you

    Maybe

    select id_number,
           id_owner,
           description,
           next_action_required,
           modified_date
      from (select a.id_number,
                   a.id_owner,
                   a.description,
                   n.next_action_required,
                   n.modified_date
                   row_number() over (partition by a.id_number,a.id_owner
                                          order by n.modified_date desc,n.next_action_required desc) rn
              from table1 a,
                   table2 n
             where a.id_number = n.id_number
           )
     where rn = 1
    

    Concerning

    Etbin

  • How to make readable text fields after the filling of data

    Hello

    Once we get the data in the message text entry fields, we have a few only readable areas.
    I tried to make these fields as readable as follows:

    In the property inspector Table RN, I changed the functional property of 'Read' only True value
    But in the custom OAF page, text box is missing for this field.
    Could someone help me how to do this?

    Thanks in advance
    Nanoo

    Hi Nanoo

    Here's the modified code, you can use

    public void setReadonly()
    {
    XXIDVOImpl vo=getXXVO1();
    Row poRow = vo.first();
    for(int i=0;i
    

    I hope that helps!

    Thank you
    AJ

  • How to make a calculated field in the view object

    I use Jdeveloper 11 R2 (11.1.2.3)

    In some cases I need to calculate a field based on information from another object of usage view

    I came up with the idea of a transitional attribute for the first object view and try to initialize in the Get accessor method in RowImpl

    But I don't know how I can access another display object in the class RowImpl

    Any solution or suggestion?

    Appreciate your comments

    Concerning
    Mohsen

    Create an accessor from view in the t you want to access another VO.
    get the other VO by using the Get accessor of the accessor to view in a rowset obj.
    setnamedwhereclauseparams if necessary.
    ExecuteQuery and then iterate over the rs to get any desired attribute - note the attribute must be the attribute in the called t.

    Edited by: bigchill 06/03/2013 17:37

  • How to make a visible field if the value in the three text boxes do not match?

    Hello Experts.

    I have a form with three text boxes.  I would like a warning box to display when recording warning the user that "these amounts do not match!  I would also like a textbox become visible when you save the document and remains visible in the layout until the amounts match.  I don't want to prevent the user to save the document, I just let them know that there are potential errors.

    I would use something like the following:

    If textbox1! textbox2 =! textbox3 =

    {textbox4.presence = "visible" ;}

    Also, have a pop-up message box during registration as follows:

    xfa.host.messageBox ("these amounts do not match!", "Title", 2);

    My question is how to write this, and what events should I use for this?

    Any help is greatly appreciated.

    Thank you

    Jerald

    Place the code in the event of a preSave any control below...

    The language is Java Script

    If (textbox1.rawValue! = textbox2.rawValue! = textbox3.rawValue) {}

    xfa.host.messageBox ("these amounts do not match!", "Title", 2);

    TextBox4.PRESENCE = "visible";

    }

    else {}

    TextBox4.PRESENCE = "invisible";

    }

    Also place the same code in the output of al lthe thre events (textbox1, textbox2, and textbox3) text fields...

    Thank you

    Srini

Maybe you are looking for

  • Calculator HP10C

    I turned on my computer and I get GRAD view in the view bar.  How to disable this option? Thank you

  • Rendering of fonts help

    I struggled to find a solution to this problem of rendering of fonts, but even with several days of trial and error, I have been unable to understand and am in urgent need of help, please. I have a blog on Tumblr and use a paid Pixel Union theme (Ves

  • Can not install "Common Modules" on my Portege 2000

    I'm trying to install "V.6.01.00 of Toshiba common Modules" on my 2000 Portege XP Proffesional with SP2, but "ACPI namespace cannot! "GNS.exe end." error 5 times before the laptop then show me button and when I press "it is not and ACPI system" it is

  • both sets of criteria to fill the third table of research

    Hello- I'm very new to the numbers and support communities. I have read help and searched this forum but could not find a similar question. I appreciate any advice or suggestions. I created two table of numbers of our customer base and trying to trea

  • interrupt an event of any other event handler

    Is it possible to have an event that interrupts another handful rutin event? I mean, I have an event handle the structure with several events (case). One of this event takes place, and the structure begins to run in rutin. Meanwhile, rutin is running