Show/hide in an ADDT form

has anyone successfully used a show/hide script of any kind in an ADDT form?
What I'm trying to do is, I've got Yes and No radio buttons.  If Yes is clicked, a text box appears in the row below.
If No is clicked, no change occurs.
I had one that was working but now all of the sudden it is no longer working.  What happens now is when you arrive on the page, the text box that is supposed to be hidden, is visible.  However, when you click No, it disappears and if you click Yes, it reappears.
Below is the code.  I'm thinking there must be a conflict between the javascript code below and ADDT.  Any help is appreciated!  Thanks!
<SCRIPT LANGUAGE="JavaScript">
function showhide1(id,str)
    if (document.getElementById)
        obj = document.getElementById(id);
        if (str == "show") //obj.style.display == none
            obj.style.display = "";
        else if (str == "none")
            obj.style.display = "none";
</script>
  <tr><td align="right">Will anyone in your party require translation services at Open House?</td> <td> <input type="radio" name="translation" value="Yes" onClick="showhide1('display','show');">Yes<input type="radio" name="translation" value="No" checked  onClick="showhide1('display','none');">No</td></tr>
        <tr id="display"><td align="right" > In what Language? </td> <td> <font color="red">*</font> <input type="text" name="language"></td></tr>

OK, I added a function that fires on page load so that the conditional row will be displayed if the Yes radio button has been checked.You should now remove the CSS rule for the conditional row. I tested the code with Firefox 3 and IE8 and it works but it is by no means complete.
<script type="text/javascript">
window.onload = showRow;
function showRow() {
if (document.getElementById("radioYes").checked)
{document.getElementById("display").style.display = ""}
else
{document.getElementById("display").style.display = "none"};
function showhide1(id,str)
    if (document.getElementById)
        var obj = document.getElementById(id);       
        if (str == "show") //obj.style.display == none
            obj.style.display = "";
        else if (str == "none")
            obj.style.display = "none";
</script>
The HTML code for the two table rows should now be:
<tr><td align="right">Will anyone in your party require translation services at Open House?</td>
<td><input name="translation" type="radio" onClick="showhide1('display','show');" value="Yes" checked="checked" id="radioYes">Yes
<input type="radio" name="translation" value="No" id="radioNo" onClick="showhide1('display','none');" >No</td></tr>
<tr id="display">
<td align="right">In what Language?</td>
<td><font color="red">*</font>
<input type="text" name="language"></td></tr>

Similar Messages

  • APEX4: Is it possible to show/hide a field on form based on Radio selection

    Hi,
    On a form, I've a radio group (with two values) and two select list. Based on the selection in radio group, I want to show/hide the select list.
    Like, when the user clicks Radio Group Value - RG_A, SL_A has to be visible, and when user clicks Radio Group Value - RG_G, SL_B has to be visible.
    Is this possible in APEX 4? How can I do it?
    Thanks for the help.
    --Hozy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi,
    Yes, you can do it using Dynamic Actions.
    See this thread as well. APEX4: Populating fields from database based on the SelectList value
    In Radio Group you will need to identify the button clicked from its ID and / or value. Thats because the Radio Group Item creates as many IDs / Items as there are options P1_ITEM_0, P1_ITEM1_1, etc.
    Regards,

  • With a PDF Dynamic form using show/hide actions, how to ensure that when the completed form is saved, closed and re-opened, the form still show the fields as before it was closed?

    With a PDF Dynamic form using show/hide actions, how to ensure that when the completed form is saved, closed and re-opened, the form still show the fields as before it was closed?
    I have developed a form with fields hidden by default, that become visible based on box ticked or radio button selections.
    My problem is that, when I close the form and re-open it, it comes back to it's default presentation, regardless of the information already recorded in the form (including in the now hidden fields.
    How to correct that
    Thanks in advance for any hint you can provide.

    I've had the same problem. This solved it...
    Go to the "Form properties..." in the File-menu. Select "Run-time" to the left and in the box "Scripting" Preserve scripting changes to form when saved: choose Automatically (Script-based state changes are saved locally in an insecure fashion. This option cannot be used for certified forms).
    Hope it works for you to...

  • How to show/hide a form field?

    Hi all,
    Is it possible to programaticlly show/hide a from input field at runtime?
    best

    You can use javascript to achieve this and following is the code I'm using in one of the forms to hide a field when this form is being opened.
    ..after displaying page...
    declare
    v_id number(10);
    begin
    v_id:=p_session.get_value_as_NUMBER(
    p_block_name => 'DEFAULT',
    p_attribute_name => 'A_ID',
    p_index => 1
    If v_id is null then
    htp.p('<SCRIPT LANGUAGE="JavaScript">
    function get_index(p_name) {
    var i;
    for (i=1; i<document.forms[0].length; i++){
    if ( document.forms[0].elements.name == p_name) {
    return i;
    var j = get_index("FORM_NAME.DEFAULT.FIELD_NAME.01");
    document.forms[0].elements[j].style.visibility="hidden";
    </SCRIPT>');
    End If;
    -Krishnamurthy

  • Is there a way to show / hide email campaign newsletter opt-in form based on current opt-in status?

    We have a secure zone with email campaign opt-in as both a part of the registration form and as a stand alone form for users logged into the secure zone.
    We want to only show the opt-in form to users who are not already registered for the campaign, but cannot find a way to do this via modules / tags / liquid / API.
    I have searched the forums and cannot believe this is not possible. If not possible, it should be put on the list of development requests.
    Is this possible and if not, any suggestions?
    The best workaround I can think of is to use a CRM field to track campaign opt-in status and then js/css or liquid to show / hide the form.
    Thanks.

    You won't be able to have a page showing 24 charts per host.
    I really think that it is a bad idea to create a group per host, just to have the ability to add many charts.
    The maintenance effort will be a big penalty.
    Regards
    Rob

  • Show/Hide action & Submit Form action on mobile apps

    I want to set up multiple small "help" buttons in various places on my PDF form so that when the user clicks on them, additional information is shown.
    However, my understanding is the the show/hide action is not supported on most mobile devices using the free Adobe Reader.
    Do tool tips work on mobile devices?
    Does the Submit Form work on mobile devices?
    Can anyone help with a suggestion/workaround?

    Hi,
    bind the value properties of the input fields to a managed bean in viewScope. E.g. value=#{viewScope.managedBean.attributeName}. This then guarantees that the bean content survives the request and the data is still there
    Frank

  • Is it possible to show/hide dynamically columns in RDLC form?

    We need to show/hide dynamically columns in our Report RDLC form based by the user desire needs.
    We need by the predefined checkboxes to set which columns should be seen and which should be hidden.
    Is it possible in RDLC form to make it "show/hide columns dynamically" with any way?

    Depends on what you mean dynamically, you still need to press the view report button.
    What you can do is right click on the column you want to be able to hide/display in design mode,
    click "Column visibilty", choose "show or hide based on an expression" then in your expression base your true or false on a boolean parameter for each column

  • How to hide fields in UIX form

    Hi
    I need to update the table with last_updated_by and last_updated_date every time if any change to the record. But I do not want to show these 2 fields on the screen.
    Could you help me how to hide fields in UIX form/any procedure to insert the data to database with out placing them in the screen .
    Thanks in advance.
    NRK

    Now that you mention it ... the rendered flag will stop the field from being rendered. So it's not even in the page. Stupid me.
    Have a look at formValue. These are rendered, but invisible fields in a form. That should do it (hopefully).
    In prepareForDML() you could simply call the setter of your date attribute that stores the date of the last update. There you pass the current date, or you could fetch the sysdate from the database and pass that. If you go that way, then the EntityImpl could make these adjustments automatically when inserting or updating and you wouldn't even need these fields/bindings in your UIX page.
    Just check what the operation is, and if it's an update or insert then call the setters of the attributes you want to update. Then call super.prepareForDML(). Something like that.
    It all would happen in the middle-tier, client not involved.
    So formValue should work, and the prepareForDML() stuff should also work. Don't know which way you want to go.
    Sascha

  • Can't get show/hide subform to work.

    Although I've done my best to show/hide a subform through a radio-button in Livecycle, I can't get it to work.
    Any help will be greatly appreciated.
    Please see:
    https://dl.dropboxusercontent.com/u/92058288/problem.jpg
    https://dl.dropboxusercontent.com/u/92058288/hide%20or%20show%20subform.pdf

    You have created the object on Master page that causing the issue also missed the 'presence' after object name. I redesign the form but not on master Page and apply the below script and its working
    Click event of 'Nee' radio button
    if(this.rawValue == 1)
    xfa.form.form1.subform1.sub1.presence="hidden";
    Click event of 'Ja' radio button
    if(this.rawValue == 1)
      xfa.form.form1.subform1.sub1.presence="visible";
    For more info refer the below screenshot.

  • Making links that show/hide layers?

    Hi all,
    I created an InDesign cs4 file which is pretty much a guide for users of my liveCicle form. I have a bunch of layers in the file.
    I'm trying to make links associated with images that are in its own layers. So when i export the file to pdf and hit certain link, layer associated with that link shows up. I tryed to do this in acrobat 9 pro. I created links, but the problem is that links in non visible layers work behind the scene when i hover over.
    Is there a way to set layer visability in inDesign CS4?
    Thanks in advance

    No you can´t toggle layer visibility with buttons made in indesign. You have to finish it in Acrobat....
    Only way to make something appear or disappear in ID is to use show/hide buttons action...
    You can convert those images you want to show&hide to buttons. Then you can create another buttons to show or hide them.
    If you export as PDF, default state of a button can be hidden...

  • Why does the revealed image flicker when using the Show/Hide feature?

    I started using the Show/Hide Button and Forms function in InDesign CS6 and have had some peculiar things happen. I was mocking up some samples and on the swf version if you hover over the left side of the blue rectangle all is fine but if you move to the right side of the blue rectangle the image starts to flicker. When you hover over the red rectangle the pop-up image just flickers constantly. I guess there must be some issue with having the button for a revealed image under some portion of the revealed image. See: http://www.idugsf.com/_a/FI_BookSamples.html .
    The problem went away when the button and the revealed image did not overlap.
    This problem didn't occur with another file I had originally created in CS5.
    On the pdf version the buttons which are on their own layer behind the revealed image moved to the front in the pdf: http://www.idugsf.com/_a/FI_BookSamples.pdf
    [email protected]

    Remove the dimensions in the following
    <div class="tooltipContent" id="sprytooltip11">  <img src="pix/1-pp-all-490x480.jpg" width="850" height="750" /></div>
    Gramps

  • Show / hide field based on text in another field

    Hi,
    I'm trying to make one of my fields reactive to what is the text generated in another field.
    At the moment I have this under calculate using custom javascript:
    var Mask = this.getField("Course").value;
    if(Mask == 'Swimming') this.getField("Code").display = display.visible;
    else this.getField("Code").display = display.hidden;
    Whereas Course is the field that is changing and Code is the one that will show/hide based on content of Course.
    Any help?

    Hi Everyone,
    After doing trials with simple calculations it still wasn't working and so I've figured out what the problem is - the document was being exported but with the data being pre-populated from an SQL database in which during the export it all happens at once, not a chain effect so when the export happens it was filling "Code" before "Course" had any info in it...
    The fix was basically having to create a different field in the SQL source itself for an independent field on the pdf form.

  • Using JavaScript to show/hide fragments

    Hi,
    Can anyone point me in the direction of information or an example of JavaScript being used to show or hide fragments within a form?
    I'm looking to add JavaScript to the XDP content of my fragments so that these fragments will be shown or hidden depending on the evaluation of certain conditions.
    If I create a form, and reference a fragment within that, then I can hide the fragment using this JavasScipt embedded within the form:
    xfa.form.MyForm.MyForm.MyFragment.presence="hidden"
    However, I'm looking to add the JavaScript to my fragment. I've used similar JavaScript but when the form and fragment are assembled the fragment is always displayed.
    Can anyone help here please?
    Thanks,
    Ray.

    Hi,
    Can anyone help here at all?
    All that I need for now is how to get JavaScript included in my fragment invoked when a form that includes that fragment is assembled.
    When the fragment is rendered by itself the JavaScript is invoked. But not when it's rendered from within another form. Why is this?
    Thanks,
    Ray.

  • Show/hide fields when selecting an option from a drop-down menu.

    Hello Gurus!
    I have a question about creating a Java Script withing Acrobat pro.  This is what i would like to do: I created a drop-down menu with several selection entries.  Upon the customer making one of the selection entries, i would like for the correct fields that i created to become visible and all other fields to hide.  Is this even possible to do?  The reasoning behind this is because we have a form that customers have to generate in order to request access to certain financial accounts; we have over 20 different types of accounts and for each instance the customer has to fill out the same form.  By creating a drop down menu, i can use the same form by just changing the drop-down selection and clicking on the designated fields for that selection.  At this time i have over 20 different forms that poing to 20 different account requests and i would hate to send the form 20 different times to one person.  The reason i can not add all fields desired for all accounts is due to the fact that the form would be filled with hundreds of checkmarks and instructions thus making the process too tideous for the customer.  Hope you guys can help out.
    ~Vader

    The good news is, it can be done (and it has been done).
    There are a few things to be aware of, however.
    The most important is that the form must be planned well, which means that you must think carefully about your logic and even more so about your field naming (hierarchical field names are your friend). One fundamental issue, you have to be aware of, is that this form no longer will be a "standard form". The consequence of this is that you may have to be aware that you might get into trouble when you have to prove that your user filled out that particular standard form (talk to your compliance and forms management people about that).
    You also may have to decide whether the form should be usable in Reader. And, if so, how much you want to spend on the right to do so. You will see below why…
    There are actually two approaches for dynamically showing/hiding parts of a form. If your form can be separated between a fixed first page (where you also have the account type selection), and a variable part (depending on the selection), you could use Templates, which you spawn according to the selection, and delete pages when you change the selection. This approach is very easy to implement, but requires Reader Extensions Server to allow it to work in Reader; Acrobat Pro's extended rights are not sufficient for that.
    The other approach is showing/hiding fields. If you did your homework well, it would be very easy to first hide all subsequent fields, and then show the ones you need in two lines of code. This approach does not require extended rights for Reader at all, as long as your forms will always have the same number of pages, for each of your account types. This approach also works for the cases where the differences between the individual forms are very small. It does also work for showing/hiding bigger chunks of the form. In that case, you might create the "background" separately, and then put it as an icon into a button field which you will show/hide together with the carefully placed on top of it active fill-out fields.
    There is a third possibility, which Adobe Propaganda probably would suggest, and that woudl be subforms in LiveCycle Designer. The consequence is, however, that you won't have PDF forms, but proprietary XFA forms instead. And you may have more developing and maintenance work than with the other approaches.
    Back to your original question: you could use a Keystroke script evaluating event.changeEx of the combo box field. Depending on that, you would run your action to set up the according form part. The other way to do it would be evaluating event.value in the onBlur event. The latter would have the advantage that the selection has been made, and you get a bit more time to set up the form (this may in fact be an issue, particularly with Acrobat 9 and 10, which may take their time to show/hide fields).
    Another possibility instead of a drop down (combo box field) would be a popup, where you would have a button to press, and the list of selections pops up. This second method uses app.popUpMenuEx().
    Hope this can help.
    Max Wyss.

  • Show/Hide layers?

    I am creating a multimedia book.  I want to have a button on the page that when clicked will bring up a flash movie in the center of the page and then a button to click that will make it go away.
    I have done this quite easily in dreamweaver for websites by a show/hide layers button but do not see how to do it in indesign.
    Thanks for any help...

    You can't build that functionality in with InDesign — but you can with Acrobat Pro. You've got to use the form builder functions to create a button that will show or hide another element.
    d

Maybe you are looking for

  • How do I set Page Width to Multiple Pages?

    How do I set Page Width to Multiple Pages? I notice when Cross Tabs are used, the report spans over several pages in width. Can I set this option without using a cross-tab? Since I am having trouble finding a paper width that is 100 inches wide, I wa

  • How to Create a Flat File using FTP/File Adapter

    Can any body done workaround on creating the Flat file using FTP/File Adapter?. I need to create a simple FlatFile either using of delimiter/Fixed length. using the above said adapters we can create XML file, i tried concatinating all the values into

  • Correct procedure to update Embedded Controller Programme - T43

    Dear Forum, Could somebody please describe the best way to safely update 'Embedded Controller Programme' in a T43? - The computer is a Thinkpad T43 1871 PM1 machine - BIOS Version is 1.29 - Embedded Controller Version is 1.03 - Apparently this is the

  • Problem finding current iTunes library

    When I opened iTunes today it wouldn't open my current library but instead asked for me to choose a library to open. The only ones available are the previous iTunes libraries the most recent of which is from a month ago since which I had added more m

  • How do I get back to default settings for photoshop elements edit

    How do I get back to default settings of photoshop elements 9 for edit.   I tried to edit one picture and now all of my pictures are discolored.