If a checkbox is selected how to make a text field required

Hi
I hoping someone out there can help me.
I am creating a form in adobe acrobat 9, I have a checkbox called 'other' and a text field named 'other_please_specify'. What I am hoping to do is when a user selects the 'other' checkbox the 'other_please_specify' text field becomes required. I will also need some sort of action that if a user deselects the 'other' checkbox then the 'other_please_specify' text field is no longer mandatory.
Can anyone help me figure this out?
Thanks in advance

If by required you mean the required property of the field, the Mouse Up script of the check box can be something like:
(function () {
    // Get a reference to the text field
    var f = getField("other_please_specify");
    // Set the required property depending on the check box state
    if (event.target.value !== "Off") {
        f.required = true;
    } else {
        f.required = false;
The "if" block can be simplified to:
    // Set the required property depending on the check box state
    f.required = event.target.value !== "Off";

Similar Messages

  • How to make a text field required at run time when the user clicks the checkbox ?

    I got a form where , there are several checkboxes and text fields associated with that checkboxes.If the use clicks on the check box then the associated
    text fields should become required.I have tried the change event and the click event for the checkboxes.It gives error in the onChnage event and I got some weird results in the on click event .Sometimes if the user click the check box , then for the 1st time the field doesnt become required , then the user onclicks the check box and when the user clicks the checkbox for the second time the field becomes required,but if i deselects the highlighted field option and selects it again the field becomes required even if the user onchecks it I am totally confused !!! Adding to it i have also written the wrong code still i achieved the desired result ?? How it can be possible . I am writing the codes below , please help me as i am working under a deadline from the client.
    onChange event :
    var newVal = this.boundItem(xfa.event.newText);
    if(newVal == 0)
        xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1" ).validate.nullTest = "disabled";
      else
         xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1" ).validate.nullTest = "error";
    For the onClick event :
    var a = xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row2.CostItemRecovere d_OnlyEnergyCharges").rawValue;
    //app.alert(a);
    if(a == 0)
        xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").validate.nullTest = "error";
      if(a == 1)
          xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").validate.nullTest = "disabled";
       Please help someone !!!

    I used the onchange event and wrote the code for it. I got the result . But there is a problem.All these fields are in a table and it's a dynamic table where you can add rows dynamically at the run time .I have other change event for some fields in this table .All are working fine when i add the row.But for this check box the required fields are not validated as required at the run time . I am here giving the code , Please help me .
    form1.Subform0.Subform1.Subform9.Subform10.Table48.Row2.CostItemRecovered_OnlyEnergyCharge s::change - (JavaScript, client)
    if(this.rawValue == "1")
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L2_1").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L1_2").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L2_2").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L1_3").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L2_3").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L1_4").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L2_4").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L1_5").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L2_5").mandatory= "error";
    else
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").mandator = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L2_1").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L1_2").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L2_2").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L1_3").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L2_3").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L1_4").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L2_4").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L1_5").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L2_5").mandatory = "disabled";

  • How to make a text field exactly 3 chars wide?

    I have an telephone area code item text field in a form which only can be input 3 digits. How can I make this text field exactly 3 chars or digits wide?
    Appreciate!

    244805,
    What browser are you using?
    I just set up an item with Width & maxWidth of 3, and I cannot type more than 3 characters in it. I also changed Width to 1, and it still worked as I expected.
    As I alluded to in my prior post, the size is approximate - it all depends on the font size used.
    Thanks,
    - Scott -

  • How to make the text fields as mandatory (in 'notes and attachment' tab)?

    Hi,
    We have defined some Fixed Values for texts under IMG>SRM>SRM Server>Cross Application Basic Settings>Text Schema>Define Fixed Values for Texts, for a certain transaction type of RFx responses for a text schema.
    Because of this, the bidder can choose one of these fixed values for texts. This is perfectly working fine.
    Now the question is, we want to make the texts fields as mandatory. i.e. The bidder should not be able to submit the responses if certain texts are blank.
    Is there be any BadI for this?
    GH

    You can use BBP_DOC_CHECK_Badi for this field validation using a filter value RFx/Bid (I ont remember exact word).
    Regards,
    Jagadish.

  • How to make a text field smaller in size

    Can I make a text field smaller in size (not just the length
    but also the height) depending on the font size eg 10px. Whatever
    font size I seem to use the text field stays the same size.

    Can you give an explicit example of what you want? Are you
    referring to the
    font size that someone sets in the browser, or the size you
    set in the page?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "~Billy~" <[email protected]> wrote in
    message
    news:fa3oh4$67u$[email protected]..
    > Can I make a text field smaller in size (not just the
    length but also the
    > height) depending on the font size eg 10px. Whatever
    font size I seem to
    > use the text field stays the same size.

  • How to: Make Shipping Condition field required in Tx. VT01N

    Hi everyone. I need to make the Shipping Condition field required in the transsaction VT01N Create Shipment.
    I don't know how to do this, can somebody help me with this issue???
    Thanks for your help!

    Hi Chemo,
    As far i undestand, you want to calculate freigth cost using transportation.
    To do this, you need to do some settings at that point to achieve that, please follow the link to configuration guide:
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/LETRA/SDTRA.pdf
    On functional side (after configuration), you´ll need to create the shippment cost document on VI01 transaction, there you can see all the cost associated to Shipping.
    After that transfer it to MM using T-code VI02, its needed.
    I Hope this help you,
    Regards,
    RP

  • How to make a table field Required

    Hi,
    I tried to make a table field as 'Required'. It works fine. But it gives unexpected results. Imagine the table has 10 rows. when the user make an entry in the first row, the system gives the error messages for the required field in the remaining rows as well. How can we restrict it so that it checks for the required field only for the row with entries. How to specify the condition type?
    Kind Regards
    Shahul

    Hi,
    check this :
    don't set table field as 'Required'.If your table data contains in a internal table , then use Below code under <b>PAI</b> event.
      LOOP AT i_data.
        CHAIN.
          FIELD:  i_data-fld1.
          MODULE validate_field.
        ENDCHAIN.
      ENDLOOP.
    MODULE validate_field INPUT.
    write the code to validate the each line of the table control, if validation fails , cursor will stop at the table control row
    ENDMODULE.
    Regards
    Appana

  • How to make a text field become empty when clicked in.

    I have an input textbox, if the user clicks 'submit' and the
    box is empty, it returns "please type answer here" in the input
    box. Is there a way to make it so when the user clicks in the input
    box it will turn back to blank and be ready to type instead of
    having to select the existing text and delete it?
    Thanks :)

    yep, use the onSetFocus method.
    my_text_field_instance_name.onSetFocus = function() {
    my_text_field_instance_name.text = "";
    but be careful here, because if the user fills in there info,
    then clicks off the text field then back on, the text will
    disappear, you will need to use a combo with onKillFocus or an if
    staement.... play with it. its real simple
    corey

  • How to make a text field wrap to next page

    I've done my best to find the solution to my problem before coming here to post, so forgive me if I've missed a previously posted solution.
    I am a .NET coder, using iText to manipulate PDF's.  I need to create a template for a corporate invoice that will allow me to have header and footer content on a page, surrounding the invoice detail section and have the invoice detail wrap to the next page as necessary.
    Criteria:  All pages have the invoice header.  All pages have the invoice footer with pagination (i.e. Page 1 of n).  The number of pages is controlled by the number fo lines in the invoice detail text field.
    For example, if the text field holds 30 lines and each line item takes up a single line.  An invoice with 25 line items would only use one page.  If the invoice has 35 line items, the content in the text area needs to flow to page 2 in the invoice detail area.
    I have tried every combination I can dream up in Adobe LiveCycle Designer and I cannot get a document set up that will flow from page 1 to page 2.
    For me to be able to access invoice detail field in code, it appears that it needs need to be a Text Field.  I've been able to access the fields from my .NET code and fill them in without issue.
    What I cannot get is a template that will allow me to put more content in the detail area than fits on page one and have it automatically create a second page and flow the content into the detail area.
    Can anyone point me in the right direction, or provide a working sample PDF?
    I.e.
    PAGE 1:
    MY COMPANY
    ADDRESS
    INVOICE #20
    Line item #1
    Lilne item #1 detail
    Line item #2
    Line item #2 detail <from here, detail must flow to the detail section of the next page>
    Page 1 of 2
    PAGE 2:
    MY COMPANY
    ADDRESS
    INVOICE #20
    Line item #3
    Lilne item #3 detail
    Line item #4
    Line item #4 detail
    Page 2 of 2

    While I appreciate the direction to the samples, that is not resolving my issue.  I had already seen the samples before I posted in this forum.
    None of the samples have what I've requested assistance with above.
    I need a static 3" header, a 5" content area and a 1" footer on every page in a document.  I want to be able to put content in the content area and have it wrap to subsequent pages if the content is more than will fit in the area.  Each subsequent page must also have the 3" header, 5" content area and 1" footer.
    This will not be edited in Acrobat, it will be edited in .NET code without human intervention, so having click buttons to add another row to a table is not an option.
    I could create the entire PDF programmatically, but I'm seeking to find if Adobe LiveCycle Designer can make the PDF form in an easy to use GUI.
    If the details of my need above do not provide a clear requirement, feel free to point that out.

  • I cannot figure out how to make the text larger on an incoming email.  The finger method doesn't work and I cannot find any toolbar with which to do it.  I could find nothing in settings also.  Plese help and thank you.

    I cannot figure out how to make the text larger in a received email.  The finger method doesn't work and I can find no tool bar as I can for composing emails.  I can find nothing in settings.  Please help and thank you in advance.

    Hi there,
    Download a piece of software called TinkerTool - that might just solve your problem. I have used it myself to change the system fonts on my iMac. It is software and not an app.
    Good wishes,
    John.

  • How to make a text "drawer" in iWeb

    Does anyone know how to make a text "drawer" in iWeb? What I mean is when you click on a hyperlink to read more text, but instead of opening up a new page, it makes the text appear below the link on the same page.

    Anything fancy with iWeb has to be done in the HTML Snippet or after publishing the page.
    Find the code for the drawer, apply it and show us the result.
    Perhaps not the drawer you had in mind but this is something near:
    http://www.wyodor.net/Ajax/
    Here's another one with drawer in the title:
    http://jqueryfordesigners.com/slide-out-and-drawer-effect/
    http://jqueryfordesigners.com/demo/plugin-slide-demo.html
    Found with : [text drawer|http://www.google.com/search?client=safari&rls=en&q=text+drawer&ie=UTF-8 &oe=UTF-8]

  • How to make read only field in Task list?

    Hi All,
    How to make read only field in Task list?

    This can be done one of two ways:
    1. Customize the form in Infopath, right click your field and disable the control.
    2. Use JavaScript/jQuery on the page to disable the element.
    Andy Wessendorf SharePoint Developer II | Rackspace [email protected]

  • How to make Sales Office field mandatory in VA01 initial screen?

    Hi,
    How to make Sales Office field mandatory in VA01 initial screen? I mean in the first screen where we enter the document type and the sales area?
    Regards,
    Ajit

    Dear Deepak,
    Thanks for the clarification.
    But, as far, I have understood the query - it is very simple and that is..
    Whenever one creates a Sales Order (T.Code: VA01), Parameter: Sales Office needs to be mandatory (for all Sales Order, irrespective of Customer Account).
    Until-unless, user won't enter the parameter: Sales Office, System will not lead to next page (now, here we need to enter Customer/ material etc...).
    I have answered the query, in this regards, only.
    Best Regards,
    Amit.
    Note: Pls. correct me, if I am wrong. Thanks for everyones guidance.

  • How to make tax classification field mandatory in sales order ?

    Hi,
    while creating sales order, " how to make tax classification field mandatory ".
    Please tell me the procedure.
    In tcode OVA2. what are the entries for fields,table.
    Regards,
    sapsduser

    Dear ,
    Could you please share why you want to make tax Classification field mandatory in sales order.
    Maintain Tax classification field for customer in Customer Master Data = (Sales Area Data - Billing document Tab page)
    Tax Classification field for Material in Material Master Data = Sales Org. 1 View.
    While creating sales order and enter customer and material system automatically fetch the tax classification related data into sales order.
    Tax is calculated based on the ship to party.
    Hope this will help you.....
    Regards,
    Manoranjan.

  • How to make valuation type field not changeable  in delivery tab of PO

    Hai friends,
                    I am new to badis..please guide me to solve the issue...
    how to make valuation type field not changeable  in delivery tab of PO...
    The field shd be in display mode only ...actually...there  a badi has been used before
    to get valuation type from a ztable depending on material and plant...
    Now ..my requirement is that the user shd not change the default value brought from the ztable...

    Hi SRINIVAS,
    You can achieve this from BADI only if BADI is allows you to do this. You cannot achieve everything from a BADI. Check if there is any expoting field in the methods that can be ticked for making the field in display mode. If not then you cannot achieve this from BADI.
    The field you want to default to display is a standard or zfield. If z, then you can changethe attribute of the screen field to Output only.
    Regards,
    Manish

Maybe you are looking for

  • HP Officejet 6700: A problem with the printer or ink system.

    I'm not sure what the problem is anymore since I've bought new cartridges and applied them carefully and correctly. My printer uses 933 for CMY and 932 for Black. Interestingly, it gives me this error when I installed the black cartridge. I don't und

  • SOA Composites not getting deployed after adding AppsLoggerService

    Hi I am trying to enable logging for mediator components. I followed this kix page (Fusion Logging and Error Handling for SOA[https://kix.oraclecorp.com/KIX/display.php?labelId=1918&articleId=200788]) to enable the logging. After adding the service t

  • My iPhone pre order experience.

    So after staying up since 3:00am I finally noticed the apple store was also offering the pre order. I had no issues going through the ordering process.  I have two lines on my account only one being eligible for the upgrade. I contacted a verizion re

  • Storing report document in Session

    Hi I have followed the advice on storing the Report document in the Session object. My code does this in the Page_Load event when not a postback. It all seems to work until I attempt to drill down to a sub report. I'm then asked for parameter info ev

  • Release strategies for purchase requisitions

    Hello, I'm having trouble with profiles and roles for release strategies, this is the scenario: -for purchase requisitions we have two approval levels, release code S1 and S2. When release code S1 is cleared, then S2 must be approved. The head of a c