Hide an option button when a text field is filled?

Hello

I was wondering if someone could help with this.  I want to set up a form for a radio button is disabled when a field is filled in.

I tried a simple Action (show/hide a field), but I would like the user to be able to change your mind - so if they begin to enter the field of information and then delete, they can always select Yes or not later.

I hope I'm explaining this well.  I read through the discussions and the acticle of Thom Parker, but I am sorry to say that because I don't know Javascript, it is completely over my head.

Any help would be greatly appreciated!

Thank you.

If you want the buttons radio is available that when the text field is empty and inactive when the text field is not empty, you can use the validation script customized for the text field:

// Custom Validate script
(function () {

    // Reset the radio button field
    var f = getField("rb1");
    resetForm([f.name]);

    // Set the readonly property based on this field's value
    f.readonly = event.value;

})();

Replace "rb1' with the actual name of the option buttons.

Tags: Acrobat

Similar Questions

  • How you grey on an option button if a text field is blank in Adobe Acrobat Pro XI?

    How you grey on an option button if a text field is blank in Adobe Acrobat Pro XI?

    So, what I'm doing:

    (     )   | TEXT FIELD.

    (     )   | TEXT FIELD.

    (     )   |                  |

    (     )   | TEXT FIELD.

    I have a radio button :)

    and a text field. TEXT FIELD.

    The third text field is empty, and I would like to than radio button gray (the user cannot click on it) because the text field is empty. Is it possible to get? I guess I'll have to use javascript, but what would the code and must it be entered in the javascript for the text field editor or the radio button?

    Thanks in advance guys

    Enter this code in the custom text box validation script:

    this.getField("RadioButtonName").readonly = (event.value == "");

  • 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");

  • Is it possible for someone to insert a logo when you fill out a form to fill out? I'm looking for all the options under the button 'add a text field.

    I have created a form to fill out that is a contract, but I need a way for the person who is to fill the form to insert their logo.  Is it possible for someone to insert a logo when you fill out the form to fill out? I'm looking for all the options under the button 'add a text field.

    It is not possible within a text field, either. If they have Acrobat, they can use the built-in under Tools - editing content Add Image tool.

    If they drive XI or higher, they can use a button form field you will need to set up for them, but the image must be in PDF format.

  • Hide the "submit" button when there is nothing to report

    Hello

    I have a simple command with a 'running total' good quantities ordered at the top of the form, (FormCalc) calculated as follows:

    the sum of $ = (Products.PRODUCT_GROUPS. DATA[*]. PRODUCTS. DATA[*]. Quantity)

    If this amount is zero (that is, nothing has been ordered) so I want to ban the form submitted by e-mail. I thought that the best way to achieve this would be to hide the submit button when this field is zero and show when > 0.

    I tried adding this code for the same event in this field to calculate:

    If ($ > 0) then

    Button1.presence = "visible".

    on the other

    Button1.presence = "hidden".

    endif

    but no go.

    Sorry if it's real simple, but I would appreciate the help!

    Thank you.

    When, in the code window, you will see that it says something about Ctrl + click for the SOM expression. So if in the event code for an item, you can press CTRL, then click on another point and it will insert the correct reference in your code. We must ensure that emphasis is placed in your code when you do and the mouse cursor will turn into a broad V.

    You can do a right click in the code window and select check the syntax of the Script to see if there are problems.

    When you view the form in preview, Ctrl + J opens the JavaScript debugger. It may need a config first in Acrobat. It has been a while since I put that up. Instead of making app.alert, you can do console.println and it will write in the JavaScript console. Occasionally, you may need to debug something dealing with the development and the app.alert itself affect the focus.

    Have you thought about putting your code preSubmit event and displaying a message that nothing has been entered? Also don't xfa.event.cancelAction = true

  • Bind a radio button to a text field in a pdf form

    Forgive my ignorance, but nobody knows how to bind a radio button to a text field in an Acrobat pdf form?

    I have a series of 4 radio buttons. If you click on one of them, I want to activate a text field then you will need to fill out. In addition, it would be good to have if you do not click on the radio button you are able to fill the text box.

    I'm a designer not a programmer, so I don't know much about javascript. Can anyone help?

    Thank you very much

    You might want to look at hiding and showing form fields by Thom Parker. You can also clear the text field when the radio button is changed.

  • RADIO BUTTON BOX REQUIRE TEXT FIELD.

    I have a group of checkbox button Radio I want ONE of the check boxes, when checked, to trigger the text field and a text field to be required to not be necessary when the checkbox is disabled or disabled. How can I accomplish this?

    Figured it out!

    If (event.target.value == "Three") {}

    this.getField("Text_Field_1").required = false;

    }

  • Visible when printed text field

    Is it possible to show a text field only if a State of the checkbox is checked and make them disappear if it is not checked by the text field? This part, I know how to do.

    The trickiest part is I want the text box to be visible during printing, even if the box is not checked... Is this possible?

    When you assign visibility = "hidden";

    relevant value = "+ print";

  • Syntax to hide an option button in a group of radio buttons

    Good afternoon

    Syntax question.

    I have a group named 'CheckMainbox' with 4 appointed choices radio buttons "option 1" "choice 2" "3" and "choice4" choice. "»

    My code project

    {if(Event.Value=="true")}

    this.getField("CheckMainbox").value = "choice1". display.hidden <-this is an incorrect code, but what is the correct syntax to do this?

    }

    I found this:

    Field compared to the attributes of the widget

    Some properties of the Field object as value, apply to all the widgets that are children of this field. Other properties, such as rect, are specific to the different widgets.

    Methods and the following field properties affect the attributes at the level of the fields:
    calcOrderIndex charLimit, comb, defaultValue, doNotScroll, currentValueIndices, doNotSpellCheck, delay, doc, editable, exportValues, fileSelect, multiline, multipleSelection, name, numItems, page, password,
    ReadOnly, required, submitName, type, user name, value, valueAsString, clearItems, browseForFileToSubmit, deleteItemAt, getItemAt, insertItemAt, setAction, setItems, signatureInfo, signatureSign and signatureValidate.

    Methods and the following field properties affect the attributes at the level of the widget:
    alignment, borderStyle, buttonAlignX, buttonAlignY, buttonPosition, buttonScaleHow, buttonScaleWhen, display, fillColor, hidden, point peak, lineWidth, impression, rect, strokeColor, style, textColor, textFont, textSize, buttonGetCaption, buttonGetIcon, buttonImportIcon, buttonSetCaption, buttonSetIcon, checkThisBox, defaultIsChecked, isBoxChecked, isDefaultChecked, setAction and setFocus.

    So I think the following would work for a widget:

    Get the widget 0 for Radio Button1;

    var f = this.getField ("Radio Button1.0");

    f.Hidden = true; hide the widget;

  • Color of text field properties fill does not

    With the help of Acrobat 11.0.03 on a Mac:

    I'm creating a form for a client and we would like the grey background on one of the fields to indicate to their clients that they do not need to fill that (but the client would like to have always as a modifiable for their use text box). I entered in the properties box, click on the fill, selected color the color I want, turned off the coast of the transparent box, but when I close on the color picker, nothing happens.

    Screen Shot 2013-09-04 at 12.53.19 PM.png

    I tried several times, tried to change the color of the border instead, closed on editing the form and returned it, close the document, restarted Acrobat, and nothing seems to work yet. I know that I could go back into InDesign (where I created the original document) and that make a gray box, but I would rather try to understand why it does not work as it should (and previously).

    Any suggestings or is it possibly a bug? Thanks for your time!

    Several people have reported this kind of thing, so it could very well be a bug and you should consider reports. In the meantime, what happens if you try to set the color using JavaScript? For example, to add a temporary and defined button mouse Up JavaScript as follows:

    Mouse upwards to button script

    getField("Repair_Tracking_#").fillColor = color.ltGray;

  • Brand Table field required when other Table fields are filled in

    Hello

    After combing through the forums, I couldn't find an answer for the following script scenario.

    (Or maybe I ask the wrong question)

    I have a Table (Name: InputTable) with a header row and footer line (for a Grand Total function), add/remove buttons, as well as scripts of the Addition.

    Customer has requested that if an amount is set in one of Cell4, Cell5, Cell6, Cell7, Cell8, Cell9 or Cell10
    Cell1 becomes a required field.

    This array must have an Initial number of 10 lines, so I can do simple Cell1 required, because there could be lines in white/empty subject, and which would be the fire errors.

    Could someone please provide an example of Script, I need to add to the Row1 Cell1? (Or where to look for resources)
    And this script is possible to work on all of the added lines?

    I do a lot of scripts and sincerely could help with that.

    Thank you in advance, I thank you for taking the time to help me!

    -Michelle

    well, well because when you calculate your total must always be the last row, otherwise I do not think that it reads the line just below the total

    so do something like this

    TopmostSubform.Page1.InputTable.Row1.Total::calculate - (FormCalc, client)

    var intTotal = Sun + Monday + Tuesday + Wednesday + game + Fri + Sam

    If (intTotal gt 0) then

    Cell1.mandatory = "error".

    on the other

    Cell1.mandatory = "disabled".

    endif

    $.rawValue = intTotal

  • Mandatory text field / drop-down list under option RadioButton

    Hello

    I am working on a form with a set of option buttons: individual or joint.

    A drop-down list will become visible if the user clicks on the joint. How can I set this drop-down list to be mandatory when the 'joint' is clicked?

    And also - what would be the script as if I want to put a text field to become mandatory according to radio button clicked?

    Thanks in advance!

    Hello

    You can write the following script in the button click event

    to make the object TextField or DropDownList required and visible when clicking on the radio button and

    text field / dropdown list not to be mandatory when it is hidden.

    If (this.rawValue == 1)
    {
    TextField1.presence = "visible";
    DropDownList1.presence = "visible";
    TextField1.mandatory = "error";
    DropDownList1.mandatory = 'error ';
    }
    on the other
    {
    TextField1.rawValue = null;
    DropDownList1.rawValue = null;
    TextField1.presence = "invisible";
    DropDownList1.presence = "invisible";
    TextField1.mandatory = "disabled";
    DropDownList1.mandatory = "disabled";
    }

    Thank you

    Stéphane.

  • Then click on the button--&gt; number increased by 1 text field

    Hello!

    I have no coding experience and want to create a game like Cookie Clicker. A game of the idle clicker.

    So I have my button and a text field that says "$ 0". How can I do, that when I click on the button the "$ 0" turns to "$ 1" and so on...?

    I use Actionscript 3 as a type of file, I hope it's okay.

    I hope someone will help me.

    Greetings!

    stir in your policy.

    p.s. I don't download and fix the files except if he is hired.  free help I offer only via the adobe forums (and this problem must be completely soluble via the forum).

  • Radio button selected user jumps to the text field

    Hello

    Is there a way to blow up a user of a radio button selected in a text field.  For example...

    1. the user will have two options of the radio button.  One option is YES and one option is no.

    2. the user must choose Yes or no (must)

    3. If the user selects YES (radio button), I want the shape of jump them to a text field to fill out additional information.

    I was able to do this with a box, but not the radio button.

    I did research online and via the forums but have not yet found a solution.

    Thanks much for any direction or resources!

    OK, with a checkbox or a radio button, you can use the mouse event to the top, but check the value is different. For the Yes option button where the value of the key (aka export value) is set to 'Yes', you would do something like:

    Script mouse upward to a radio button

    If (event.target.value = 'Yes') {}

    getField("text1").setFocus ();

    }

    Do the same for the box but use the corresponding export value.

  • How to hide the Submit button in the TEB?

    Using Cap 9, with the last update.

    I added a 'text area' group to a slide. After validation of the entry, I would like to hide the whole group. I call it a group because you get the field and the Send button.

    I can't hide the field because I can give it a name and then refer to it in my Advanced actions. But I can't see the button submit as well, so I can't hide it.

    Did I miss something? Is there a work around known for allowing me to hide the Send button and the text input field?

    No, it's an object built in, which means that you can not solve, because there is no correct ID. In addition, you can add States either. I tried that as well. Embedded objects are very limited.

    I have however a workaround. It depends a bit on the used theme, but the Send button is often a text button. This is my workflow

    1. Because you cannot change the style of a button text, I replaced it with a transparent button.
    2. I did this totally invisible to the user transparent button: fill opacity = 0%, line width = 0 and remove the button caption (label).
    3. I created a text caption or a shape with 'Submit' and dragged under the TEB in the timeline panel. It is not necessary for the output SWF, but it's for HTML output. This text container has an ID and will be visible because the TEB button is completely transparent.
    4. When the user clicks on the button submit, I trigger a successful action that will be:
      1. Hide the text container (Submit)
      2. Mask of the ETB

    If you do this several times in a project, you can create a shared action.

Maybe you are looking for