How to linking a textfield to another when checkbox is checked.

HI All
Can Anybody please help me;)
I want to do the following: I have to textfileds in a pdf form. Next to the second textfiled is a checkbox. I want to have the second textfiled to be linked to the first one only when the checkbox is checked.
So when the checkbox is checked, the second textfiled should have the same value as the first textfield. Whe the checkbox is not checked The second textfiled can be overwritten and has its own value.
This is my try:
var g = this.getField("checkbox1");
if(g.isBoxChecked(1))
var f = this.getField("Text1");
event.value = f.value;
Now the if statement doesn´t work. But when i just have this:
var f = this.getField("Text1");
event.value = f.value;
It works fine, and both textfiled s have the same value.
Can anybody please help me?;)
I am searching the whole net now for 2 days and haven´t found anything usefull. I also didn´t find anything in the adobe documentations and sample pdf files:(
Thanks for any hint;)
cheers dietmar

Corey,
Use a combo box with the part number and a switch statement (on blur, and commit immediately) linked to several text fields for the description. Something like this:
var combo1 = this.getField("Combo Box5").value;
var endDefault;
var a = this.getField("Text1")
var b = this.getField("Text2")
var c = this.getField("Text3")
switch (combo1){
case "Select an address":
getField("Text1").value = "",
getField("Text2").value = "",
getField("Text3").value = "";
break;
case "Part #1":
getField("Text1").value = "Part #1 Description",
getField("Text2").value = "Line break 1 description",
getField("Text3").value = "Line break 2 description";
break;
case "Part #2":
getField("Text1").value = "Part #2 Description",
getField("Text2").value = "Line break 1 description",
getField("Text3").value = "Line break 2 description";
break;
case "Part #3":
getField("Text1").value = "Part #3 Description",
getField("Text2").value = "Line break 1 description",
getField("Text3").value = "Line break 2 description";
break;
default:
endDefault = false;
if (endDefault = false)
app.alert("Please select from the drop-down menu",3);

Similar Messages

  • Mutiply textfield by value when checkbox is check

    Hello all,
    I have a fillable PDF Form, built in Adobe Acrobat Pro X, that I am creating as a repair form with charges included in it.
    I know how to have a value filled in a given text field when a checkbox is checked.
    My question is this.  Say I have a textfield labeled as "labor_hrs" that is set to a number format.  What I want to do is to have this box multiplied by a given value of 45.00 populated to the "labor_chrg" text field.  I can get this feature to work on its own.
    What I want to do is only have the value populated to the "labor_chrg" when the checkbox labeled "billable" is checked.
    Any help would be appreciated.

    A quick way is to set the export value of the "billable" check box to 1.
    You can then use the simplified field notation script of:
    (labor_hrs * 45) * billable
    A custom JavaScript calculation:
    function GetField(cName) {
    // return field object with error checking;
    var oField = this.getField(cName);
    if(oField == null) app.alert("Error accessing field " + cName, 0,1);
    return oField;
    } // end GetField function;
    event.value = (isNaN(GetField("billable").value) == false) * GetField("labor_hrs").value * 45;
    If you add a hidden field for labor rate called "labor_rate", then you can use the "Field is the product of the following fields:" and select the "billable", "labor_hrs", and "labor_rate" fields.

  • How to link one menu to another.

    Hey guys,
    I am creating a user input form for car types and car parts. I want to link one menu to another. I.e. the first menu will be make with a list of car makes, and if the user chooses "Ford" then the next menu will load items from a table "Ford" with the Ford models in it. I have the tables created in a database, one tabel is make with 50 different makes, and then i have 50 other tables for each make with the model types in it.
    Sorry if this is confusing please ask me if you need any more info.
    Thanks in advance

    supersham101 wrote:
     I want to link one menu to another. I.e. the first menu will be make with a list of car makes, and if the user chooses "Ford" then the next menu will load items from a table "Ford" with the Ford models in it.
    What you are looking for is a dependent drop-down menu. To get the values for the second menu, you need to send another request to the server, either by submitting the form again, or by using an Ajax request to populate the dependent drop-down. I don't know of any online tutorials for doing this, but you should be able to find something by doing a Google search. I know that "jQuery in Action, Second Edition" by Bear Bibeault and Yehuda Katz (published by Manning) describes in considerable detail how to do this.

  • How to link two modules of data when querying the data ?

    Hi ,
    I am using Designer editor to create a form .
    I am having two modules with the tables EMPLOYEE and department .
    In my form ,I want to display the data of each employee with the department data .
    How to link the two tables data in the designer ?
    How to View the generated triggers in the designer ?
    Thanks
    Sai

    Two modules means two forms. These are unrelated.
    Or do you mean that you have one form with two blocks (master-detail)?
    How to link the two tables data in the designer ?You have to define the foreign key on the tables. Based on this FK Forms Generator will generate the code if you create two Module Components (master-detail) in the module. Don't forget to define the Key Based Link on the master block.
    How to View the generated triggers in the designer ?You can't. You have tom open the generated FMB file in Forms Builder to see what code is generated.

  • How to make text box required field if checkbox is checked??

    I have a web form that I need to look something like this:
    (Checkbox) Check here if it is for an individual  ID: (textbox) Required field if checkbox is checked and a numeric value
    (Checkbox) Check here if it is for an organization ID: (textbox) Required field if checkbox is checked and a numeric value
    (Checkbox) Check here if is neither (textbox is hidden and not required if "neither" is checked)
    Currently the form looks like this: http://ncsu.edu/advancement-services/resources/researchrequest.html.  The above information is going to go where it says prospect name and id number on the form.  I would like to have the three checkboxes in a menu instead if that is possible.
    How do I make the form do this?  I created the form in the above link but I don't can't figure this one out.
    Thanks so much in advance!!
    Erika Roe

    Sharmila,
    My form is based on Master/Detail Table....I have chosen defalt layout ...Not a Custom form.
    In this case,could you suggest me what I should do ?..The customer is very much insisting on that..
    Thanks in Anticipation
    Babu

  • Make field editable when checkbox is checked, otherwise given read-only value

    I'm attempting to make a fillable PDF form, from and existing document, using  Acrobat Pro that does the following:
    Purpose of form is to provide customer a way to agree to purchase a custom artwork.
    The artwork has a base price, ArtworkPrice. (The ArtworkPrice field is editable)
    The customer can choose to include a picture frame. (AddFrame checkbox 'Yes'.)
    Choosing 'Yes' to add a frame adds an amount.  (The FramePrice field is editable only if AddFrame checkbox is checked)
    Otherwise, Leaving AddFrame unchecked fills the FramePrice field with a value of 0.00.
    The TotalPrice is calculated as the sum of the ArtworkPrice and the FramePrice fields. (The TotalPrice field is read-only)
    So...this part of the form looks essentially of like this:
    AddFrame? [  ] Yes
    ArtworkPrice $__________   +  FramePrice $__________ = TotalPrice $__________
    The FramePrice field must be 0.00 (and not editable) at all times unless the AddFrame checkbox is selected.
    How can I do this?

    Add this code to the MouseUp event of AddFrame:
    if (this.getField("AddFrame").value=="Off") {
    this.getField("FramePrice").value = 0;
    this.getField("FramePrice").readonly = true;
    } else {
    this.getField("FramePrice").value = "";
    this.getField("FramePrice").readonly = false;

  • How to link CS5 file to another file

    I've done a 12-page newsletter - complete with loads of images etc - using Indesign CS5 with links created by the TOC (Table of Contents) to each of the articles within the newsletter which will be a PDF.
    I have been advised that even as a PDF, the document will be far too costly to download on mobile devices/smartphones etc and that in order to circulate it to our mailing list, I need to produce a separate one-page Indesign CS5 file with links to the articles in my original piece of work. 
    What I now want to do is create a separate file for the front page linking to the main document which will be on our website but having spent the past two days attempting to figure out how to do this myself and trawling through my books and around the internet, I'm none the wiser.
    I'd greatly appreciate advice/guidance on the simplest and easiest way to do this with a complete idiot's guide on the steps needed to do so.
    Many thanks

    try to give <a href="your address">My Pdf</a>
    and your textfield should be html enabled
    mytextField.html=true
    mytextField.htmlText=your xml text

  • How to link a button to another frame in Flash CS3?

    I have a button, and on it, there is this code:
    on(press){
       gotoAndPlay("second");
    the frame I want to link to is labeled "second", but the link is not working. What is wrong?

    your button is a movieclip button and "second" is not in that timeline or "second" is not in the timeline that contains your button.
    to start, don't add code to any object.  assign your button an instance name (eg, btn) and use:
    var tl:MovieClip=this;  // assuming this timeline contains "second"
    btn.onPress=function(){  // and you should use an onRelease for this.
    tl.gotoAndPlay("second");

  • How to stop the keyboard from showing when checkbox is selected

    Whenever a user checks off a checkbox, the keyboard appears.
    How do I turn off this feature?

    This is likely a web-site-specific issue.  Can you share a link to the web page that behaves this way?

  • How to disable row in tabular form when checkbox checked?

    Hi.... this is what i want to do....
    I created tabular form for offering items... there is a checkbox that is used to select item with lowest price...
    But i have also one column that shows item options ( option is for example... i want offer for 22" monitor Samsung, but seller have only 22" LG monitor.... so in my offering will be shown item (22" monitor Samsung) that i want, and in row below item (22" LG monitor) that seller have... both items will have same order id....
    Next thing i want to do is when i select checkbox with item (22" LG monitor) as lowest price, i want that row with same order id (22" samsung monitor) is disabled.
    Is that possible to do?
    This is my code for creating tabular form:
    SELECT
    CASE WHEN RED_BR_OPCIJE = 0 THEN '-' ELSE TO_CHAR(RED_BR_OPCIJE) END RED_BR_OPCIJE,
    apex_item.hidden(1, ID_STAVKE)||
    apex_item.hidden(2, ID_STAVKE_IZ_ZAHTJEVA)||           ---order_id
    apex_item.hidden(3, ID_PONUDE)||
    apex_item.hidden(4, ODABIR_NAJPOVOLJNIJE_STAVKE)||     
    apex_item.checkbox(5, '#ROWNUM#', null, decode(ODABIR_NAJPOVOLJNIJE_STAVKE, 'X', '#ROWNUM#')) Odabir,    ---checkbox_lowest price
    apex_item.textarea(6, NAZIV_ARTIKLA_TRAZENO, 3, 40, 'readonly="readonly"') NAZIV_ARTIKLA_TRAZENO,
    apex_item.textarea(7, NAZIV_ARTIKLA, 3, 40, 'readonly="readonly"') NAZIV_ARTIKLA,
    apex_item.text(8, SIFRA_ARTIKLA, 8, 20, 'readonly="readonly"') SIFRA_ARTIKLA,
    apex_item.text(9, JMJ, 5, 20, 'readonly="readonly"') JMJ,
    apex_item.text(10, KOLICINA, 6, 20, 'readonly="readonly"') KOLICINA,
    apex_item.text(11, JEDINICNA_CIJENA, 12, 20, 'readonly="readonly"') JEDINICNA_CIJENA,                                      ---price
    apex_item.text(12, IZNOS_STAVKE, 12, 30, 'readonly="readonly"') IZNOS_STAVKE,
    apex_item.text(13, IZNOS_RABATA, 12, 20, 'readonly="readonly"') IZNOS_RABATA,
    apex_item.text(14, JEDINICNA_CIJENA_NAKON_POPUSTA, 12, 20, 'readonly="readonly"') JEDINICNA_CIJENA_NAKON_POPUSTA,
    apex_item.text(15, IZNOS_STAVKE_NAKON_POPUSTA, 12, 20, 'readonly="readonly"') IZNOS_STAVKE_NAKON_POPUSTA
    from PONUDE_STAVKE
    where ID_PONUDE = :P34_ID_PON
    ORDER BY ID_PONUDE ASC, ID_STAVKE_IZ_ZAHTJEVA ASC, RED_BR_OPCIJE ASC
    And this is example table with a few column names:
    order_id      option_number               item_name                      price         checkbox_lowest price
    1086                    -                Samsung 22" monitor              100$                 null                ---this row should be disabled because next row is selected as lowest price
    1086                    1                LG 22" Monitor                    90$                 X                   --- both rows have same order_id
    1050                    -                Router                            100$                X

    Hi snake2903,
    {thread:id=998140}
    {thread:id=1554583}
    {thread:id=2249233}
    Hope it helps!
    Regards,
    Kiran

  • How can I make Ipad4 stay "on" when cooking and checking online recipes?

    Hi,
    I love cooking and baking from online sites with my IPad in the kitchen.
    Whenever I cook and then return to check on the recipe, it has gone to sleep and needs password etc.
    I understand that the sleep time can be adjusted, but it suits me well for all other activities, so I was hoping that I could set a particular time for this particular activity.
    Too much to ask for, or does anyone know?
    Thanks.

    Thanks for your help.
    Hope that future IPads get more defined with their "auto lock". Presentations and cooking really need some special treatment.

  • How to link an subvi(worksheet) with another VI

    hi,
    I want to know how to link worksheet data with another VI's block diagram? ie i want to use 3 data's collected in the worksheet block diagram  changed into a subvi and this subvi should be linked to another block diagram that accepts these 3 inputs to give some warning.
    Please help me how to link these two ........:...............
    Solved!
    Go to Solution.

    Sorry but I'm confused by most of your statements. There is a worksheet in Excel and a block diagram in LabVIEW but there is no such thing as a 'worksheet block diagram'.

  • How to hide a TextField when clicking another button

    Hello!
    I've been able to generate a TextField to appear when clicking a button, but when I click on another button, to display some more information, I still have the first TextField displayed.  I've had a look around, but not been able to find anything to help me with getting the first to disappear.  Can anyone provide any ideas for this?
    The code I'm using for displaying the TextField is:
    button10.addEventListener(MouseEvent.CLICK, fl_ClickToPosition);
    var fl_TF:TextField;
    var fl_TextToDisplay:String = "Send disply to the right screen/projector";
    function fl_ClickToPosition(event:MouseEvent):void
    fl_TF = new TextField();
    fl_TF.autoSize = TextFieldAutoSize.LEFT;
    fl_TF.background = true;
    fl_TF.border = true;
    fl_TF.x = 300;
    fl_TF.y = 100;
    fl_TF.text = fl_TextToDisplay;
    addChild(fl_TF);
    Many thanks in advance

    all your buttons should call the same function. 
    because each button probably triggers different text to be displayed, you can use an object or dictionary to associate the buttons and their text:
    // execute these two lines and your function once at the start of your app
    var dictionary:Dictionary=new Dictionary(true);
    var fl_TF:TextField;
    function fl_ClickToPosition(event:MouseEvent):void
    if(fl_TF&&fl_TF.parent){  /
    fl_TF.parent.removeChild(fl_TF);
    fl_TF=null
    fl_TF = new TextField();
    fl_TF.autoSize = TextFieldAutoSize.LEFT;
    fl_TF.background = true;
    fl_TF.border = true;
    fl_TF.x = 300;
    fl_TF.y = 100;
    fl_TF.text = dictionary[e.currentTarget];
    addChild(fl_TF);
    ////////// and for each button use something like:
    button10.addEventListener(MouseEvent.CLICK, fl_ClickToPosition);
    dictionary[button10] = "Send disply to the right screen/projector";

  • When a linked .pdf is clicked, it downloads rather than following the link and opening in another safari window.

    When a linked .pdf is clicked, it downloads rather than following the link and opening in another safari window.

    Thanks for the tip, but I had already tried this and it did not help. The File still downloads and , at the same time, a new Safari window opens - but the Safari window is blank.
    Another discussion thread related to this problem is:
    How do I prevent automatic downloading of .pdf files?
    but this deals  with Safari 5.1 which evidently has a problem with Adobe Reader.
    I am using Safari 5.0, so the suggested solutions do not apply. ( I tried them anyway, but they did not work.)

  • How to link another forms and reports in one main forms?

    hai all,
    how to link another forms and reports in one main forms?
    i am creating Custom forms Main_menu
    in that i am puting on button and
    pl/sql code for when-button-pressed
    BEGIN
    Open_form('GROUP_MSTR_ENTRY');
    END;
    i am getting:
    ERROR:frm-40010: cannot read form GROUP_MSTR_ENTRY
    also i am un able change the text colour in form.
    how to link reports in forms?
    any help?
    before open i have to link all form i need?
    thanks in advance
    rcs
    ------

    even after changing to The forms_path variable and
    put the executable(GROUP_MSTR_ENTRY.fmx
    F:\oracle\ora90\FORMS60\server\FACCT\MAIN_MENU\GROUP_MSTR_ENTRY.FMX
    not working
    also i am un able change the text colour in form. how?
    how i can find?
    $ORACLE_HOME/forms/server/default.env
    my files are
    9i oracle database
    SQL*Plus: Release 9.0.1.0.1 - Production on Fri Dec 19 11:37:07 2008
    E:\oracle\ora90\bin\oemapp.batt
    forms6i
    F:\oracle\ora901\bin\
    since 9i is later than forms 6i i am unable to put in the same directory
    ------------

Maybe you are looking for

  • Apple tv without wifi and airplay

    Hi, I don't have a wireless network so I hardwired my apple tv. I can use airplay between my macbook pro and apple tv (after turning ipv6 off). I would like to use airplay on my ipad 2, so I shared my internet connection to my ipad. The only problem

  • How do I add a Subnet and vlan with a catalyst 3550 and RV120

    Hello Friends. I have a scenario that i'm hoping i can get some help with. I'll be as detailed and descriptive as i can. This is for a business with 100 employees nodes and 100 camera nodes all needing IP internet through private addressing and publi

  • Use variables to create a custom Closed Captioning option

    Hey, I have a click box and text caption. On click of the click box I want to display a text caption and then on all slides throughout a project want that text caption box to remain on each screen, but want the content in that box to change per scree

  • Macbook air and movie editing?

    Has anyone use a "beefed up" Macbook air with iMovie and/or final cut pro? If so, how does it work?

  • IPhoto doesn't import

    Hi everyone, I could really use some help. I recently acquired a new MacBook Pro (i7, Snow Leo 10.6.3) to replace my old one (MacBook Pro Core 2 Duo, SnowLeo 10.6.3). So I wanted to take my photos from my iPhoto 08 to the new iPhoto 09. So I copied m