When a box is checked, fill a text field with a value

I don't know that it's simple; However, I am very new to acrobat and javascript.

Here's what I want to do:

I have a checkbox field and a text field. If the checkbox is turned "on" I want to fill the text field with a specific numeric value.  If she isn't 'unchecked' there is not value or value 0.  Any help is appreciated.

Enter this code in the custom of your text field calculation script:

This.getField("CheckBox1").value = Event.Value == "Off"? 0: 1234;

Tags: Acrobat

Similar Questions

  • Creating a page of my Web site that allows users to fill out text fields, with basic formulation tools (text sizes, formatting, etc.).

    Hey, I would like to create a page on my Web site that allows users to fill out text fields, with basic formulation tools (text sizes, formatting, etc.).

    Another thing I need to allow users must be able to upload their own graphics to the pre-assigned fields. Thank you please advise me on how I would go to this topic.

    Nothing to do with the Muse. You need a system dynamic as Joomla, Wordpress, Drupal and so on. Otherwise, there is no way to store your information.

    Mylenium

  • Auto fill the text field with user logon Windows users

    Can someone tell me how to achieve the following objectives, I want a text field in my form to be filled automatically with the windows users username.

    I found an answer 'Define a new variable REMOTE_USER - user domain\username Request.Server should display'

    This script/s should I use on the forum and put it where?

    Thanks in advance.

    Steven Thompson

    Sydney, Australia

    First you must put the code I provided in a special level of the Acrobat application folder and then restart Acrobat or Reader.

    Enter the folder level Scripts by Thom Parker

    Then, in your form field, you can use the following code in the "custom javascript calculation:

    Event.Value = Identity.loginName;

    Note the capitalization of the word 'identity '.

    The application-level script will work with Acrobat and LiveCycle Designer Forms.

    If you want to use a feature, you can use the following code in an application-level folder:

    getIdentity = app.trustedFunction (function (cProperty) {}
    app.beginPriv ();
    cValue = identity [cProperty];
    if(cValue == undefined) {/ / check for the unknown identity property}
    App.Alert ("property of the identity is not known:" + cProperty);
    cValue ="";
    } / / end if not defined
    return cValue;
    app.endPriv ();
    } / / end app.trustedFuncton
    ) / / end getItentity

    And then in the "custom calculation script:

    Event.Value = getIdentity ("loginName"); get the loginName

  • text field with numeric values for sorting

    I'm having a problem my sort. Usually, when the column follows a format, I can use a combination of INSTR and LPAD to sort correctly. In this new case, my columns does not follow a specific format.

    Sample data:
    with t as(
    select 'xxx 10 MG yyy' sortcol from dual union
    select 'xxx 5 MG yyy' from dual union
    select 'xxx 28 MG yyy' from dual union
    select 'aa 10% 12.5 ' from dual union
    select 'aa 6.25% 12.5' from dual union
    select '222 zzz 30/17.5' from dual union
    select '222 zzz 30/5.5' from dual
    )
    select * from t
    
    SORTCOL
    222 zzz 30/17.5
    222 zzz 30/5.5
    aa 10% 12.5 
    aa 6.25% 12.5
    xxx 10 MG yyy
    xxx 28 MG yyy
    xxx 5 MG yyy
    I want to sort the data in the
    222 zzz 30/5.5
    222 zzz 30/17.5
    aa 6.25% 12.5
    aa 10% 12.5 
    xxx 5 MG yyy
    xxx 10 MG yyy
    xxx 28 MG yyy
    I'm trying to replace all numerical values in the string to have 4 digits. For example:

    xxx yyy MG 0010
    xxx yyy MG 0028
    xxx yyy 0005 MG
    0222 zzz 0030/0017.0005
    0222 zzz 0030/0005.0005

    If Oracle will sort correctly digital in the form of text fields. I thought I found the solution with the regular expression:
    select regexp_replace('x10x100x6.5x','([0-9]+)',lpad('\1', 4,0)) from dual
    
    x0010x00100x006.005x
    But the problem is that the backreference in the LPAD overrides the value before it run LPAD. He treats her like the literal string '\1' as oppose to the reference value: 10, 1, 6, and 5. Therefore, LPAD think length is always 2, length ('\1') = 2 instead of length('100') = 3.

    Is there another method to develop all the numbers? Thank you for your time.

    Hello

    You can do with nested REGEXP_REPLACEs:

    SELECT   sortcol
    ,      REGEXP_REPLACE ( REGEXP_REPLACE ( sortcol
                                 , '([0-9]+)'
                              , '000\1'
                              )
                   , '[0-9]+([0-9]{4})'
                   , '\1'
                   )     AS four_digits
    FROM       t
    ORDER BY four_digits
    ;
    

    You probably don't want to display the string converted; you want to just ORDER BY it. It is included in the SELECT clause only if you could see what it was, for the tests.
    Output:

    SORTCOL         FOUR_DIGITS
    --------------- ------------------------------
    222 zzz 30/5.5  0222 zzz 0030/0005.0005
    222 zzz 30/17.5 0222 zzz 0030/0017.0005
    aa 6.25% 12.5   aa 0006.0025% 0012.0005
    aa 10% 12.5     aa 0010% 0012.0005
    xxx 5 MG yyy    xxx 0005 MG yyy
    xxx 10 MG yyy   xxx 0010 MG yyy
    xxx 28 MG yyy   xxx 0028 MG yyy
    

    As you can see, the inner REGEXP_REPLACE adds 3 leading 0 to each number, if she need to 0, 1, 2, or 3. This means that each number will be at least 4 digits, but maybe more. The external REGEXP_REPLACE replaces 4 digits with the last 4 digits only.

    Thanks for posting the sample data in a useful form. The description of the problem was very clear, and it was useful to see that you had already tried and your results on why it does not work. I wish we could mark questions as "Correct." This one was really were.

    Published by: Frank Kulash, January 21, 2011 16:20

  • PDF form: fill in the field with the value of another field

    Hello

    I have a PDF form that one of our employees has to be completed on a regular basis.

    There is a 'product' - text field, which is present on the form several times, which will contain the same information.

    From now on, my colleague has fill all these these one by one manually. But with the copy - paste, it doesn't take more than a few seconds.

    However, to facilitate work a little, I want to it to be able to simply fill out one of the fields (can be a specific, must not be dynamic) and all the other 'product' - fields automatically takes the value of the field of this first.

    How can I accomplish this?

    I noted the possibility of JavaScript controls.

    I am familiar with basic JavaScript, however never used it for PDF files.

    Any help and pointers would be appreciated.

    Thank you very much.

    This isn't a problem with script. Just give each field of the same name. Once the field names are the same, a change in one will be to another. For some reason that it does not work with standard HTML forms, probably the reason why you ask.

  • Cannot get 'IN' text field with multiple values.

    I have a text field (P11_SERIAL_NUMBERS) someone would use to enter multiple values (i.e. of the serial numbers). I tested various methods but can't seem to get anything working. I used values such as ' 12929', '19191' or ('11919', ' 19192 ', ' 1111') or 12121,121333.»

    I have to analyze this area after the entrance is and update P11_SERIAL_NUMBER to something like ("121212 ', 121211', '292929'). The report is a SQL query returning the body of a PL/SQL function. I build the query in an anonymous block to something like the following:

    SELECT apex_item.checkbox (1, instance_number) Ins,.
    apex_item. Text(2,i.instance_number) instance_number.
    apex_item. Text(3,i.item_number) item_number.
    description of the apex_item. Text(4,i.Description),
    Serial_number apex_item. Text(5,i.serial_number),
    i.party_name,
    i.status_name
    Cycsi_item_details_v I have
    WHERE i.item_number IN (SELECT v.item_number FROM cycsi_installed_base_v WHERE v.serial_number = i.serial_number v)
    AND i.item_number AS NVL ('%' |') XLA' | ' %','%')
    AND NOT EXISTS (SELECT d.item_serial_number FROM cy_fco_d, d WHERE d.fco_id = 2803 AND d.item_serial_number = i.serial_number) AND i.serial_number IN ('61763 ', ' 61621');

    However, when I enter several values that nothing ever went back to the SUMMIT even though the SQL query returns more rows. I run the application in debug mode and it seems to show the values correctly.

    0.11: show report
    0.12: determine the column headings
    0.12: analyze the query such as: TRAFFIC
    0.15: binding: ": P11_MODEL_NUMBER"= "P11_MODEL_NUMBER" value = "XLA"»
    0.16: binding: ": P5_FCO_ID"= "P5_FCO_ID" value = "2803"»
    0.17: binding: ": P11_SERIAL_NUMBERS"= "P11_SERIAL_NUMBERS" value = '(' 61621', ' 61763')""
    0.19: print the column headings
    0.19: loop lines: 15 rows
    No data found

    If I add only a serial number at a time as the APEX application returns the line correctly.


    Does anyone have an idea what I'm doing wrong or what best way to solve this problem?
    Thank you
    John

    Published by: Jennifer on July 13, 2010 15:23

    Hi John,.

    I just tried a report region based on PL/SQL query encoded using your method to refer to element names in the query string of back:

    declare
       q varchar2(100) := 'select ename, job from emp';
    begin
       if :P2_ENAMES is not null then
            q := q || ' where ename in :P2_ENAMES';
       end if;
    
       wwv_flow.debug('*** Query: ' || q);
    
       return q;
    end;
    

    As I suspected, he did not work for me P2_ENAMES was ('KING') or ('KING', 'SMITH'). I think it's because of the reason for which I gave in my previous post - ApEx passes off the coast of the dynamic execution of SQL string, it does not automatically replace the mention: P2_ENAMES with the value of the element. I don't know how it can work for you.

    If I change the code I proposed:

    declare
       q varchar2(100) := 'select ename, job from emp';
    begin
       if :P2_ENAMES is not null then
            q := q || ' where ename in ' || :P2_ENAMES;
       end if;
    
       wwv_flow.debug('*** Query: ' || q);
    
       return q;
    end;
    

    It works very well if one or several names are specified.

    I took a blow to modify your code for the construction of the query string - does not immediately guarantee, it'll work because I can't test (might be missing a parenthesis or quotation) it but you should get the idea:

    -- start with initial valid query that ApEx can parse to determine column names
    q := 'SELECT apex_item.checkbox(1, instance_number) ins, apex_item.text(2, i.instance_number) instance_number,
                 apex_item.text(3, i.item_number) item_number, apex_item.text(4, i.description) description,
                 apex_item.text(5, i.serial_number) serial_number, i.party_name, i.status_name
            FROM cycsi_item_details_v i
           WHERE i.item_number IN (SELECT v.item_number
                                     FROM cycsi_installed_base_v v
                                    WHERE v.serial_number = i.serial_number)';
    
    -- add model number condition if specified
    if :P11_MODEL_NUMBER is not null then
       q := q || ' AND i.item_number LIKE ''%' || :P11_MODEL_NUMBER || '''%''';
    end if;
    
    -- add serial numbers condition if specified
    if :P11_SERIAL_NUMBERS is not null then
       q := q || ' AND i.serial_number IN (' || :P11_SERIAL_NUMBERS || ')';
    end if;
    
    -- add FCO id condition if specified
    if :P5_FCO_ID is not null then
       q := q || ' AND NOT EXISTS (SELECT d.item_serial_number
                                     FROM cy_fco_d d
                                    WHERE d.fco_id = ' || :P5_FCO_ID || '
                                      AND d.item_serial_number = i.serial_number)';
    

    I know that has focused on getting this code works, but I would be remiss in my duties if I didn't at least mention the risk of SQL injection. You may already know this, but unless you do a good job to validate the values of the element used in the query, you could open yourself up to a SQL injection attack. For example, imagine what that would be returned if a hacker sharp entered "12345) GOLD (1 = 1" in the field of P11_SERIAL_NUMBERS - you would get all that may or may not be a security problem.

    Hope this helps,
    John

  • Try to fill a text field of a zone drop-down list by using an 'if' statement

    I am filling a text field (modelT) with the text corisponding in the 'data' part of the selectedItem in the drop-down list box. The 'data' appears correctly when I use:

    modelT.text = event.target.selectedItem.data;

    But I'm calling it with an "if" (in red) and subsequently, I can dynamically fill the text field of the multiple drop-down list box. am I missing something simple, here is my code:

    Import fl.controls.ComboBox;
    Import fl.data.DataProvider;
    Import fl.managers.StyleManager;

    var cPurpose:Array = new Array)
    {label: "Execute task", data: "1"},
    {label: "Transportation equipment", data: "2"}
    );
    var purCb:ComboBox = new more;
    purCb.dropdownWidth = 260;
    purCb.width = 260;
    purCb.move (10, 300);
    purCb.prompt = "object of truck?
    purCb.dataProvider = new DataProvider (cPurpose);
    purCb.sortItemsOn ("label");
    purCb.addEventListener (Event.CHANGE, purchangeHandler);

    addChild (purCb);

    function purchangeHandler(event:Event):void {}
    trace ("Selected" + event.target.selectedItem.data);
    purT.text = event.target.selectedItem.label;
    purCb.selectedIndex = - 1;

    If (event.target.selectedItem.data == 1)
    {
    modelT.text = "T660"
    }
    If (event.target.selectedItem.data == 2)
    {
    modelT.text = "W900;
    }

    Thanks in advance for your help

    You must delete or move the following line so that it is not set to zero for the combobox control before trying to read what is selected:

    purCb.selectedIndex = - 1;

  • Problems with the filling of a text field with 2 other fields data


    I have 3 domains Tools_1a_pri, Tools_1a_pri_other, Tools_1a_pri_txt.

    Tools_1a_pri is a drop-down list box with a predefined list. One of the options is the 'other '.  If 'Other' is selected, the text Tools_1a_pri_other field becomes visible for users to enter the name of the other tool.

    The Tools_1a_pri_txt is a text field with a calculation that shows a text indicating that no tool has been selected or the Tools_1a_pri & or Tools_1a_pri_other.

    When I select one of the predefined tools, everything works.  When I choose the other, it seems that nothing has changed.  Must I click another field before.  It's confusing for the user.

    Tools_1a_pri validate code
    this.getField("Tools_1a_pri_Other").display = event.value is "Other"? Display.visible: display.hidden;

    Computer Tools_1a_pri_txt code
    If nothing is selected, follow these steps
    If (getField("Tools_1a_pri").value.length < 2) {}
    event.target.textColor = color.red
    Event.Value = "no identified main tool";
    } else if (getField("Tools_1a_pri").value! = 'Other') {}
    If not do that if the other is selected
    event.target.textColor = color.black
    Event.Value = getField("Tools_1a_pri").value;
    } else if (getField("Tools_1a_pri").value = 'Other') {}
    If not do so if the other is not selected
    event.target.textColor = color.black
    GetField("Tools_1a_pri").value = Event.Value + "-" + getField("Tools_1a_pri_Other").value;
    }

    You have made the classic mistake of using the assignment operator in a statement instead of the comparison operator. Change this line:
    } else if (getField("Tools_1a_pri").value = 'Other') {}

    To do this:

    } Else if (getField("Tools_1a_pri").value == 'Other') {}

  • Fill in the text field of the value of select list using javascript

    Hello

    I'm editing a form where a text field is to be filled using an On-Demand application process. The process is called with an OnChange.

    Application process:
    declare
      l_CCSS_STATUS varchar2(100);
    begin
      select CCSS_STATUS into l_CCSS_STATUS from PATIENT
        where ID = :P11_PATIENT_ID;
      htp.prn(l_CCSS_STATUS);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    l_CCSS_STATUS := 'Inactive';
      htp.prn(l_CCSS_STATUS);
    end;
    In the attributes of HTML Form selection list element:

    onChange = "javascript:f_getStatus()"; "

    It fills a text field (: P11_CCSS_STATUS) when I appreciate is selected in the select list.


    I am filling a second field (: P11_COPY) with a (share) value for the same table of PATIENTS, but don't really understand how the: P11_CCSS_STATUS field is filled in from the application process.

    If I understand the request of the share in the application process, then it is appended to the value CCSS_STATUS and appears in the: P11_CCSS_STATUS text element.

    Any help is appreciated.

    Thank you
    Matt

    Hello

    visit the similar to the below application process

    declare
      l_CCSS_STATUS varchar2(100);
      l_COPAY varchar2(100)
    begin
    
      select CCSS_STATUS , COPAY into l_CCSS_STATUS , l_COPAY from PATIENT
        where ID = :P11_PATIENT_ID;
      //notice this line.... how the response is send
      htp.prn(l_CCSS_STATUS || ',' || l_COPAY);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    l_CCSS_STATUS := 'Inactive';
      htp.prn(l_CCSS_STATUS);
    end;
    

    and javascript call you to something similar to below.

    function myAjaxCall()
    {
       var ajaxRequest = new htmldb_Get( null , &APP_ID. , 'APPLICATION_PROCESS=myAppProcess',0);
       ajaxRequest.add('P11_PATIENT_ID' , $v('P11_PATIENT_ID'))
       //notice the below line.. use of split function
        ajaxResult = ajaxRequest.get().split(',')
       $s( 'P11_CCSS_STATUS' , ajaxResult[0]);
          $s( 'P11_COPAY' , ajaxResult[1]);
    }
    

    Example: http://apex.oracle.com/pls/apex/f?p=12060:110

    Kind regards
    Shijesh

  • Animate cc, the police is both by default when you change the size of the text field. Have integrated a font with the name prjFnt... but once I have change the rating in the design view of the prjFnt goes to the new roman times... what a mistake... don't

    Animate cc, the police is both by default when you change the size of the text field. Have integrated a font with the name prjFnt... but once I have change the rating in the design view of the prjFnt goes to the new roman times... what a mistake... don't have we not no matter what patch

    This problem has been fixed in the latest update to animate CC.

    You can upgrade to animate CC 15.1.0.1.13 creative use of cloud App or via the Help menu > updates.

  • fill in the text field with the caption for the radio list

    Hi, I'm looking for an answer to this all morning.  I need to use the value of a list of radio to populate a text field.  I can get the selected numeric value OK with

    $.rawValue = form1. #subform [0]. . Table3.Row1 #SubForm [0]. . RawValue location [0]

    but I want to get the text associated with the value element.  This could be the legend of the selected option button, since it is the same thing.  I don't want to use an if statement because I have a lot of forms to create and that would change things a few times in each shape.  How can I get the value of the text of the column of the item below?

    screenshot.17.png

    Try the following with two modifications to your hierarchy.

    (1) currently, you do not have a name for Page1. Make sure that you assign a name for ease of use. ("Page1").

    (2) define a name for the subform that contains PeriodRadio. ("Subform1").

    $.rawValue = form1. Page1. Table3.row2. Subform1. PeriodRadio.selectedMember (). caption.value.text.value;

    Thank you

    Srini

  • Text field with AutoComplete do not store Item Value for Cascading LOV

    Hello

    I have created a form to the APEX 4.2, and two elements on the page have a problem. The first point is a text field with AutoComplete for the PROVIDER. The second element is a list select number that has the PROVIDER as part of waterfall to fill.

    When a user selects one of the values that the field can be seized semiautomatic provider , the value autocomplété should make the selection list produce the numbers respective associated PROVIDER. The problem that I am running is that AutoComplete is not give PROVIDER selection list value is filled.

    For example: if I type 'st' in the PROVIDER field that autocompletes to "steve" is selected, the NUMBER field must interrogate him for the numbers where VENDOR = steve. However, after reviewing the Session State from the PROVIDER element, the contained value is always only "st."



    Here are the settings I have for the field PROVIDER : and NUMBER:

    name.JPGnumber.JPG

    There should be a way to have the value of the seized field semi-automatic to account for what appears after selecting a value, but I don't know what it is. You can provide any help would be appreciated.

    Thank you!

    your query full auto would: select supplier_name | ' ('| supplier_id |') '

    provider AutoComplete onChange, get the supplier_id and then value the selected drop-down list by using this code.

  • Ghost of text for a text field with Add Action

    I have a text field with text ghost. Also, there is a button to add additional text fields. When a user clicks on the 'add an additional text field button' new text field appears but without the ghost of the original text field text. I tried the script of the click event of the button to fire or run:

    textfield.execEvent("ready:form"); or textfield.execEvent("form:ready");

    Why 2 ways? LiveCycle has two ways to present it:

    (1) on the drop-down list for events (e.g. form: ready)

    (2) on the name of the field at the top of the script after box selected event on the menu drop-down (for example textfield.ready:form: :-(Javascript, client)

    Is there a better way to do it? My concern is that if I managed to shoot the event form: ready or ready: shape the event can reset all the text from the original text of default ghost of "Kansas City Royals. Thank you

    https://workspaces.Acrobat.com/?d=w3PioRrv8DUp2ruhoOY * 8g

    Put your event form script: ready in the initialize event.

    Kyle

  • Text field with AutoComplete is always NULL

    Greetings,

    I am new to Apex, so I don't know I'm missing something obvious. I use Apex 4.0.1 what I've done is created a form on a page of table and added a new text with page of AutoComplete element. This new field of text does not match a column in the table. What I'm trying to do, is allow the user to use the AutoComplete feature to make a choice. Then when the user submits the page, I want to use the substr function on the value of the field of AutoComplete and fill one of the fields in table. I tried using the PL/SQL functions in validations and calculations, but I found that the autocomplete field value is always NULL. I can access the other fields that are associated with a fine table column. It must be something simple. Thanks for your help.
    Page Items
    P2_F1  - text field with auto complete. Not associated with a table column
    P2_F2 – Text field. Is associate with a table column
    This is what I want to do:
    
    Entered this in a validation
    begin
    if :P2_F1 is not null then
       :P2_F2 := substr(:P2_F1,1,5);
    end if;
    end;
    Thanks again

    Published by: LRM on 22 January 2011 17:25

    Hello

    In calculations, you must use:

    Item name: P2_F2
    Type: SQL Expression
    Point calculation: after submit
    calculation: substr(:P2_F1,1,5)
    Condition type: the value of element in the expression is not null
    Expression 1: P2_F1

    Kind regards

    Patel Kartik
    ---------------------------------------------------------------
    http://patelkartik.blogspot.com/
    http://Apex.Oracle.com/pls/Apex/f?p=9904351712:1

  • Apex 4.02 BUG: text field with AutoComplete. wrong help text

    The rest of the wizard for a text field with AutoComplete you reach a screen where you can enter an LOV query. The text of the query box has following help text

    Enter the query that returns the list of values. The query must select two columns in the following order, first a display value then a return value. For example:

    Select ename, empno
    WCP


    When you select two identical columns, remember to use the single column alias, for example:

    Select d, r ename ename
    WCP

    However, the query must return only 1 value.

    Thank you, Rene, I fixed in 4.1.

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

Maybe you are looking for