Conditional Formula between Check Box, Combo Box and Text Field

I am very new in this area and just trying to figure out things here. Anyway, what I am trying to do is quite straight forward. I have a TextField, which the content is depending on what being selected in the CheckBox and ComboBox. The TextField shall give the value of the membership fee depending either he is Local or Abroad (CheckBox) and depending on Age Categories (ComboBox). Could you please help me in getting the script? Really appreciate it and thanks a lot in advance.

hi gilad,
tried your code already and and changed accordingly to mine:
event.value = "";
var type = this.getField("NatKid1").value;
var age = this.getField("AgeKid1").value;
if (type=="Yes") {
    if (age=="1")
event.value = 0;
    else if (age=="2")
event.value = 1;
    else if (age=="3")
event.value = 3;
} else if (type=="No") {
    if (age=="1")
event.value = 0;
    else if (age=="2")
event.value = 1.5;
    else if (age=="3")
event.value = 4;
and it works!!! still doing some trial run on some devices/gadgets and shall let you know. thanks again, gilad

Similar Messages

  • What is Condition formula/call type/routines for ECS and SECess

    HI
    what is Condition formula/call type/routines for ECS and SECess (SECONDARY HIGHER EDU CESS) to assign pricing procedure
    JFACT.

    ECS reqt is 10 and a/c key os2
    SECess reqt is 10 adn a/c key os3

  • Get the value from dropdown list (selectedIndex) and text field -- not working

    Hi All,
    I am trying to find and change by the values selected by user using dropdown and text field. Here is the code.
    ChangeRevDetails();
    function ChangeRevDetails(){
              var myDialog = app.dialogs.add({name:"Enter copyright information"});
    //    var monthlist = col1.dropdowns.add('myList', undefined, myList);
              var col1 = myDialog.dialogColumns.add();
              var col2 = myDialog.dialogColumns.add();
        col1.staticTexts.add({staticLabel:"Month:"});
              col1.staticTexts.add({staticLabel:"Year:"});
        col1.staticTexts.add({staticLabel:"Rev. no.:"});
        var myList = [ "January", "February",  "March", "April", "March", "April", "May", "June", "July", "August", "Sepetember", "October", "November", "December" ];
         var myMonth = col2.dropdowns.add({stringList:myList, selectedIndex:0, minWidth:100});//{minWidth:100});
         var myYear = col2.textEditboxes.add({editContents:"2013", minWidth:100});  
         var MyRev = col2.textEditboxes.add({minWidth:100});
        var RevMonth = (myList [myMonth.selectedIndex]);
        var RevYear = myYear.editContents;
        var RevNumber = MyRev.editContents;
        var RevToReplace1 = RevMonth +", "+ RevYear;
        var RevToReplace2 = RevMonth +", "+ RevYear + " Rev. " + RevNumber;
        var myResult = myDialog.show();
            if(myYear.editContents == "") //entry is ""
            alert("Please enter some text into the contents field.");
            ChangeRevDetails();
            else if(myResult == true) //user entered datas
                alert (RevMonth);
                alert (RevYear);
                alert (RevNumber);
                alert (RevToReplace1);
                alert (RevToReplace2);
                app.findGrepPreferences = NothingEnum.nothing;
                app.changeGrepPreferences = NothingEnum.nothing;
                // grep find/change
                app.findGrepPreferences = app.changeGrepPreferences = null;      
                app.findGrepPreferences.findWhat = "[\\l\\u]+?\\s?\\d{4},?\\s+[\\l\\u]+\\.*\\s+\\d+";
                app.findGrepPreferences.appliedParagraphStyle = app.activeDocument.paragraphStyleGroups.item("Back page"). paragraphStyles.item("Legal_7/9");
                app.changeGrepPreferences.changeTo = RevToReplace1;
                app.changeGrepPreferences.appliedParagraphStyle = app.activeDocument.paragraphStyleGroups.item("Back page"). paragraphStyles.item("Legal_7/9");
                app.activeDocument.changeGrep();
                app.findGrepPreferences = NothingEnum.nothing;
                app.changeGrepPreferences = NothingEnum.nothing;
        else //implies user clicked cancel
        myDialog.destroy();
    The problem is, it is not taking the value which the user selects from the dropdown and the text field. It takes the default value as "January" and the year is "2013" as both of these values are given as selectedIndex:0 and editContents:"2013". I have compared the coding with some other working scripts as well, but it is not working. I have added several alert boxes to check the value we get.
    Also, the find and change is also not working. Please help me on this. Thanks.
    Regards,
    Muthuraj. D

    Change the order for dialogresults:
    var myYear = col2.textEditboxes.add({editContents:"2013", minWidth:100});  
    var MyRev = col2.textEditboxes.add({minWidth:100});
    var myResult = myDialog.show();
    if(myYear.editContents == "") //entry is ""
    alert("Please enter some text into the contents field.");
    ChangeRevDetails();
    else if(myResult == true) //user entered datas
    var RevMonth = (myList [myMonth.selectedIndex]);
    var RevYear = myYear.editContents;
    var RevNumber = MyRev.editContents;
    var RevToReplace1 = RevMonth +", "+ RevYear;
    var RevToReplace2 = RevMonth +", "+ RevYear + " Rev. " + RevNumber;
    didn't have a look for the find change problem

  • How does APEX check for null values in Text Fields on the forms?

    Hello all,
    How does APEX check for null values in Text Fields on the forms? This might sound trivial but I have a problem with a PL/SQL Validation that I have written.
    I have one select list (P108_CLUSTER_ID) and one Text field (P108_PRIVATE_IP). I made P108_CLUSTER_ID to return null value when nothing is selected and assumed P108_PRIVATE_IP to return null value too when nothign is entered in the text field.
    All that I need is to validate if P108_PRIVATE_IP is entered when a P108_CLUSTER_ID is selected. i.e it is mandatory to enter Private IP when a cluster is seelcted and following is my Pl/SQL code
    Declare
    v_valid boolean;
    Begin
    IF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := FALSE;
    ELSIF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := FALSE;
    END IF;
    return v_valid;
    END;
    My problem is it is returning FALSE for all the cases.It works fine in SQL Command though..When I tried to Debug and use Firebug, I found that Text fields are not stored a null by default but as empty strings "" . Now I tried modifying my PL/SQL to check Private_IP against an empty string. But doesn't help. Can someone please tell me how I need to proceed.
    Thanks

    See SQL report for LIKE SEARCH I have just explained how Select list return value works..
    Cheers,
    Hari

  • How to populate image and text field in SQL Server

    I want to populate a table, i.e insert images in a table in SQL Server. I am using Java(JSP/Servlet). Can any one suggest me how to populate the image and text fields in SQL Server...of course, using Java. If possible, could you please give me a piece of code?
    Regards -
    Samit

    Hi,
    Please check the following link for information on inserting images in to sql server database.
    http://www.databasejournal.com/features/mssql/article.php/1475641
    Cheers,
    vidyut

  • Check box or radio button to control image opacity and text field. javascript

    This is a little over head and skill set so I am reaching out to you fine people.
    I am using Adobe acrobat pro x
    I have radio buttons now but I can switch to check box if needed.
    What I need the Java script to do is...
    If Yes is checked then a text field labeled comments appears and an image labeled box changes the opacity to 100%.
    If No is checked then it does the opposite. Text field disappears and image goes to 0% opacity.

    This is the Adobe Reader forum.  You are more likely to receive a helpful answer if you ask in the appropriate Acrobat forum (e.g. Acrobat SDK).

  • Multiple checked boxes fill in common text field

    I am attempting to create a form that has various criteria that are checked off (check boxes) and need to populate a common text field within the same form. Presently with action items I am able to design the form so that when only one item is checked it shows up on in the text field at a time not multiples  Any suggestions would help.
    Thank you

    1) In the Binding tab of your checkboxes you can put the On Value to whatever you want to populate the common text field with and the Off Value blank.
    2) Assuming all your check boxes names are CheckBox under the same subform use this script in the calculate event of your common text field:
    var aChkList=[];
    var vChecks = CheckBox.all;
    for (var a=0;a<vChecks.length;a++){
    if (!vChecks.item(a).isNull){
      aChkList.push(vChecks.item(a).rawValue);
    this.rawValue=aChkList.join(", ");
    Kyle

  • Can you create a webform which combines a check box list with a text field?

    In Business Catalyst I'm looking to create a question and answer web form where visitors to the site fill out a choice or choose other and fill in a text field. See sample below...
    Has anyone got any suggestions on how this could be done?
    The question would be as follows...
    Do you live in the area?
    _ Yes
    _ Cottager
    _ Visiting
    _ Other Location _____________

    Liam,
    Thanks for your response, now I'm finding out from the client that this is really an anonymous survey that they want to put on the site. They have been using an online survey but it keeps asking people to join by email. They are getting complaints about that so they want to find another way.
    I've tried to make the form anonymous but I can't remove the email field. Can this be hidden so it doesn't show. Or is there another way to do this?
    I'm not able to code javascript and there are other questions which are similar to the sample I gave which require a text field as well as check boxes.

  • List Box Combo box linkage

    Hi,
    I have a dashboard with a regional filter that has the same 5-metric associated to each region.  I'd like my regional global combo box to filter by each indexed metric, for example, if I select KPI 2 and Global from the combo box, I'd like the index 2 to display in order chart data indexed to 2. Each metric has a unique index # associated to each regional metric, for example:
    Index      Region    Metric
    1             Global     KPI 1
    2             Global     KPI 2
    3             Global     KPI 3
    4             Global     KPI 4
    5             Global     KPI 5
    6             NA          KPI 1
    7             NA          KPI 2
    8             NA          KPI 3
    9             NA          KPI 4
    10           NA          KPI 5
    I've selected Row as the Insertion type with two series types (Global and NA).  Each series type has it's own sourced data but all point to the same destination row (A:26:C26).  I have the combo box inserting the regional source value to the cell where the list box inserts the region B26.  When I preview only one series (NA) from the list box is dynamic, meaning  if I select KPI 2 the spredsheet selector displays the region (NA) and Index 7, but when I switch regions, to Global, it's not linked to the list box and properly capturing the new index # 2.  How can I link my list box with two series (Global and Region) to filter by Region combo box?

    Hi Araceli,
    I do not fully understand your problem (I don't understand what the listbox does). But what might work a lot easier for you is to use the Filter option and not split comboboxes. That way Xcelsius can sort it out for you without having to write too much logic.
    Or are you already using a filter?

  • Conditional validation of date and text fields using javascript

    How can we validate text and date field in sharepoint newform based on a check box.
    i have used validation settings but it do not full fill my requirement.
    i have checkbox with 4 values user can select all four values or can select any of the value. Based on the selected value i need to fire alert on a textbox and date field. Help is much appreciated.

    Hey Dilip,
    You can write your own javascript logic to achieve the same in content editor webpart on newform of list. try below links and let me know if you need further details.
    using jquery validation plugin to validate
    choice filed
    JQuery validation-select required if checkbox checked
    Thanks.

  • JEditorPane: transforming between caret position in html and text/plain

    Hi all,
    I've done quite a bit of searching, and found problems similar to this one, but not this exactly, so I'll try asking it here.
    I have a JEditorPane with HTMLEditorKit, which I'm using for a WYSIWYG text editor. When the user wants to insert something, say an image, I get the caret position and insert a String into the document's underlying text.
    The problem is that if we are the WYSIWYG mode, the caret position isn't the same as the caret position in text/plaain mode.
    So if the underlying text is
    <html>
      <body>
         Some text
      </body>
    </html>the user will just see "Some text". If they place the caret between "Some" and "text", editorPane.getSelectionStart() will return '5'. But I want to insert my text at position '16' in the plain text.
    Is there a simple way to go back and forth between these two positions? Or to have getSelectionStart() to return the index relative to the text/plain mode?
    Thanks!
    Tim

    Very poor that no one answered this one.
    Did you still need the answer?
    I have 'a' answer. But not a complete one.
    In fact I only found this in search for an answer for my problem:
    http://forums.sun.com/thread.jspa?threadID=5409216&tstart=0
    Did you actually just test out what you knew so far to test what happens?
    If you were to use the HTMLEditorKit.insertHTML function, it just wants the visual caret position. So '5' would have been reasonably correct for you.
    I was doing something like this:
                   HTML.Tag tag = null;
                   Pattern p = Pattern.compile("\\s*\\<\\s*(\\w+).*", Pattern.MULTILINE|Pattern.DOTALL);
                   Matcher m = p.matcher(text);
                   if (m.matches())
                        tag = HTML.getTag(m.group(1));
                   kit.insertHTML(doc, offset,// +1
                                  text, 0,// 0
                                  0,// 0
                                  tag);
    Assuming you were inserting a tag, my code there checks what tag it is, and if that is known by the java implementation, assigns that to 'tag', so that the element is correctly inserted.
    If it is not known, we just use 'null'. Which for me wasn't such a great result.
    In fact, nothing really was a great result, as with the default java implementation being buggy (so far as I can see) it inserted to the wrong position and caused all sorts of anomalies.
    Hope you worked it out. And if you did, and have a better result than what I have, maybe you can let me know what you did!
    Sincerely,
    sean

  • Dynamic Forms with Subforms and Text Fields

    I've been reading all of the messages relating to subforms and dynamic forms and have used many of the suggestions, but haven't found anything that addresses the problem I am having. I'm using Designer 7.0. I've saved my form as a dynamic form, I've set my text fields for multiple lines and expand to fit. My problem is that as soon as I set the parent subform to Flow Content, everything moves to the left margin. I've tried grouping items together within a subform in hopes that the items will maintain their position on the page, but everything always moves to the left margin. I'm creating a legal form that needs to have text and a text field centered at the top of the page. Below that to the left is a text field that needs to be able to expand with two text fields to the right of it. Below that are additional text fields that need to expand as needed.
    Am "stacking" my subforms incorrectly and setting the wrong subform to Flow Content? Or, can you now lock a field to a specific position? Any help would be greatly appreciated.

    Unfortunately, I hadn't understood that you needed the fields to expand in height and everything below them to move down the page. In that case, you'll need to use flowed subforms.
    Having all objects move to the left side of the page is expected when setting a subform to flowed. That's because the flow is top-down, left-right.
    One thing you could try is making the text field that needs to be centered exactly as wide as the flowed subform and then setting its left- and right-hand margins to an equal number. This would ensure an equal amount of space on the left- and right-hand sides and because the field would be as wide as its flowed container (subform), entering multiple lines of text would result in everything below moving down.
    I've attached a sample form where the page subform has been set to flowed, the text field at the top is a multi-line/height-expandable text field with its width set to the page width and its left- and right-hand margins both set to 2in and the button and check box objects are pushed below the text field.
    When text is entered into the text field, it expands in height and causes the button and check box to move down.
    To achieve other horizontal and vertical positioning/offsets, you could play with the margins of all the fields that need this.
    Stefan
    Adobe Systems

  • Urgent Help jdk 1.4.2  JWindow and Text Field

    Go thgh this code pls
    import java.awt.*;
    import javax.swing.*;
    class Test1 extends JWindow
         TextField tf;
         public Test1()
              Container contentPane = getContentPane();
              contentPane.setLayout(new FlowLayout());
              tf = new TextField(10);
              contentPane.add(tf);
    public class Test extends Test1
         public static void main(String[] args)
              Test1 t = new Test1();
              t.setSize(300,200);
              t.show();
    when the above application is compiled and run using jdk1.4 0r above the text field gets disabled. ie nothing gets entered in the text field.
    However if i extend JFrame instead of JWindow then everything is fine.
    Also note that the same code compiles and runs perfectly on 1.3.1 ie even if i extend JWindow i am able to enter text in text field.
    Pls help asap

    this works because theres an owner frame behind the window:import java.awt.*;
    import javax.swing.*;
    class Test extends JWindow
         static TextField tf;
         public Test(JFrame owner)
              super(owner);
              Container contentPane = getContentPane();
              contentPane.setLayout(new FlowLayout());
              tf = new TextField(10);
              contentPane.add(tf);
         public static void main(String[] args)
              JFrame frame = new FrameForWindow();
              Test t = new Test(frame);
              t.setSize(300, 200);
              frame.setVisible(true);
              t.setVisible(true);
    class FrameForWindow extends JFrame{}regards,
    Tim

  • Display Text Area and Text field in same line

    All,
    Please help with this scenario.
    I have 3-4 text fields, which are all on NEW LINE. I want a text area adjacent to these 4 fields.
    How to achieve this.
    Thanks and Regards,

    Hi,
    OK - My Textarea item is immediately after the first normal Text item in sequence numbers (the first item is sequence 10 on my page and my textarea item is sequence 15).
    The only settings I changed on my TextArea item are:
    Begin on new line: No
    HTML Table Cell Attributes (Element section): rowspan=4
    This second setting merges together 4 table cells in one column into a single cell
    Andy

  • Help with cfinput radio button and text fields

    I have a series of radio buttons that allow a user to select
    monetary values but I also want them to be able to define an amount
    if they choose so. I was planning on doing this by providing a
    radio button with the value of other and then using a text field to
    allow the user to enter the monetary value. The problem with this
    is that they might enter a user defined monetary value but forget
    to set the radio button to "other".
    I was hoping that I could set the "other" text input field to
    read only until the point that the user selects the "other" radio
    button. Is there a way to do this using onSelect or another method.
    Or is there a better way to approach this problem? Thanks for any
    help or advice in advance.

    Hi,
    You could call a js function which will select the radio
    button "other " when the user types something in(there are various
    events on cfinput). This way the user will not have to worry about
    selecting the radio button and your requirement will be satisfied.
    Hope this Helps.
    Thanks,
    Bhakti

Maybe you are looking for

  • Mouse pointer invisible - intel 945GM

    Hey people, thought I would document this in case others have problems.  I have partially solved the issue, but if someone knows a better solution please contribute.  I think this is specific to the intel xorg driver but not totally sure. I rebooted

  • Essbase Copy of Users to new Server

    hi, I appreciate any help How can I copy my existing Essbase Users (in Shared Service Mode) to another server Im using Hyperion 11.1.1.3 version thanks

  • Inter-company Sale

    Hi i want to create Purchase order directly from Sale Order. i have created this scenario Document Flow ----Sale order ------OutBound delivery --------PGI ----------Invoice -------------Inter company invoice i have to include PO in this Document flow

  • Problem restarting my Oracle WebLogic Server 10.3

     

  • Printer Setup Utility and trouble with CUPS

    Good day! I'm hoping that someone here might help me with a pretty frustrating problem I've run into. I'm not sure what prompted this, but for some reason, I can't seem to add any printers using the printer setup utility (PSU). I reset the printing s