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

Similar Messages

  • I paid for exportpdf and everytime i try to use tool on pdf, it asks me to subscribe. i have to log into website EVERY time. not acceptable.  how can i export only form fields that were filled in?

    i paid for exportpdf and every time i try to use tool on pdf, it asks me to subscribe. i have to log into website EVERY time. not acceptable. Some forms can't be saved so having to log in and only use webtool to upload a saved pdf won't work.
    as well, how can i export only form fields that were filled in if I can get pdf to save to computer?

    Hi kstine,
    I can see why that would be frustrating! Have you tried selecting Stayed Signed In underneath the Adobe ID and Password boxes when you try to log in?
    What did you use to create the PDF form? If you used FormsCentral, form data is saved to your online FormsCentral account. If you have Acrobat, you can export form data as described  here: Adobe Acrobat X Pro * Manage form data files
    Best,
    Sara

  • How to show chinese char form db in my jsp portlet?

    How to show chinese char form db in my jsp portlet?
    I had tried to set contentType in renderResponse, but itn't work ..

    Bent,
    You can access the database from your Java portlet, just like from any other Java/JSP environment. Yes, you can use JDBC, as well as BC4J.
    The Discussion Forum portlet was built using BC4J, take a look at it's source to see how it was done.
    Also, check out Re: BC4J Java portlet anyone?, it contains a lot of useful information too.
    Peter

  • How we create dynamic add form field in web form

    How we create dynamic add form field in web form?

    Hi,
    Thanks for reply.
    I need to create a form in which "add more" input field dynamically. For
    example sometime we need field on or more. Please look at the demo, I need
    to create form as per demo in business catalyst:
    http://www.openjs.com/scripts/examples/addfield.php

  • Show/Hide NON-DB field in a form

    Hello, I've been reading all these forums about how to hide or show form fields dynamically. Here's my situation. I have a form that updates to a table Project. By default, once a user submits this form, certain groups will be notified that a new project exists. However, we want certain users (ITSUSERS) to be able to bypass this alert. I have added a checkbox field (SKIPHD) to my form. It does not pull any information from any table. I am planning to program the behavior I want for this checkbox into the doInsert. However, I do not want this option to be visible to any non- ITSUSERS. I am working with this code from another forum member, but I'm thinking it won't work, since this is a non-database field:
    declare
    cUserid varchar2(30);
    cSecrGroup varchar2(30);
    iSec number;
    begin
    cUserid:=portal.wwctx_api.get_user;
    cSecrGroup := 'ITSUSERS';
    select count(*) into iSec from person_ctl_syn where person_username=cUserid and person_secr_group_code='cSecrGroup';
    If iSec = 1 then
    htp.p('<SCRIPT LANGUAGE="JavaScript">
    function get_index(p_name) {
    var x;
    for (x=1; x<document.forms[0].length; x++){
    if ( document.forms[0].elements[x].name == p_name) {
    return x;
    var j = get_index("NEW_REQUEST_FORM.DEFAULT.SKIPHD.01");
    document.forms[0].elements[j].style.visibility="hidden";
    </SCRIPT>');
    End If;
    end;
    This is a really big project I'm working on. I need help!

    To add to my previous problem, I'd also like (and this might be impossible for a javascript newbie like me) that when one check box is selected, another becomes visible... within the same form. I will have two checkboxes, one is SKIPHD as mentioned before and the other in SKIPNOTIFY. SKIPHD and SKIPNOTIFY should only be visible to ITSUSERS, but SKIPNOTIFY should also only be selectable if SKIPHD is selected. Possible?

  • Password-protect and hide one form field

    Hi there,
    I have been browsing through old forum discussions in search of an answer to my question.  A code George Johnson posted was really helpful, but there's  one more function I need to add to it and am struggling to figure it out on my own.
    I am creating a PDF with form fields.  Different depts within the organization will review this PDF and pass it back and forth.  The Admin dept needs one text field called "internal comments" that they can password protect.  They'd like to be able to add text, then password-protect that one field so it's hidden for other depts who review this PDF.  Admin will need the copy to be visible to them when they enter their password. 
    The script I found works really well (see below).  I set up a button to house the script, and when you click it, it locks and unlocks the "internal comments" text field with the password.  However, I can't figure out how to HIDE the "internal comments" text field after someone in Admin inputs their information.   I tried setting up a Show/Hide Field action, but I can't get it to work.  And I'm just not savvy enough to know how to alter the Javascript.
    How can I specify that the "internal comments" text field be HIDDEN when a user enters their password for "deactivate this field", and VISIBLE when they enter a password for "activate this field"?
    Any help would be greatly appreciated!
    (function () {
        // Get one of the fields in the group
        var f = getField("private.name");
        // Determine new readonly state, which
        // is the opposite of the current state
        var readonly = !f.readonly;
        var readonly_desc = readonly ? "deactivate" : "activate";
        // Ask user for password
        var resp = app.response({
            cQuestion: "To " + readonly_desc + " the fields, enter the password:",
            cTitle: "Enter password",
            bPassword: true,
            cLabel: "Password"
        switch (resp) {
        case "your_password": // Your password goes here
            getField("private").readonly = readonly;
            app.alert("The fields are now " + readonly_desc + "d.", 3);
            break;
        case null : // User pressed Cancel button
            break;
        default : // Incorrect password
            app.alert("Incorrect password.", 1);
            break;

    You could modify the section of code to something like:
            case "your_password": // Your password goes here
            getField("private").readonly = readonly;
            getField("private").display = readonly ? display.hidden : display.visible;
            app.alert("The fields are now " + readonly_desc + ".", 3);
            break;
    So it toggles both the readonly property and the display property.
    Edit: corrected typo.

  • How to Show/hide the UI Elements in a WD Application

    Hi,
    I need to show/hide and control other properties such as required, readonly etc from UI.
    Can somebody please tell me how I can do that as I am able to save and retrieve the fields from another UI, now the need is to apply them once the Application starts.
    Thanks,
    Rachit

    Hi,
    To show/hide UI elements follow below procedure.
    1) define a attribute(VISIBLE in this case) element in the context of type WDUI_VISIBILITY
    2) in the UI element properties(Visible) bind the above attribute with the element you want to make visible/Hide.
    3) call below method to hide the UI element
        wd_context->set_attribute(
         EXPORTING
           name = 'VISIBLE'
           value = cl_wd_uielement=>e_visible-none ).
    4)     wd_context->set_attribute(
         EXPORTING
           name = 'VISIBLE'
           value = cl_wd_uielement=>e_visible-visible ).  for display.
    You have to call these method at the right spot.
    Thanks,
    Sree.
    Edited by: t sree on Oct 16, 2008 3:36 AM

  • How do I create a form field?

    How do I create a SSN field in my form that is mask?  example: once the user enters the information it will look like this:  SSN *********
    Thanks for any help!!

    After filling out the form, hit the submit button, the next form pops up showing the person it will go back too, hit send then the "Save As" Box pops up and at that time the SSN field goes blank. See attached. This is driving me crazy, what am I doing wrong?? Thanks for your help.

  • How to show/hide passwords in outlook

    I can show/hide passwords in yahoo but not in outlook. How do I show in outlook

    I'm guessing you can press the little icon to the right of the password field to see the password. I'm using Ubuntu so I don't know what the icon looks like. It should be like a black WiFi signal or something. You should be able to click/hold that to see the password.
    Were you able to show that password before or is this the first time you've tried? You can try to clear the cookies for outlook.com to see if that helps but as far as I know, Windows 8 should be able to show/hide the password.

  • Hide the form field

    hai...
    i have a form which has
    three fileds,in that one fields set as
    as a combo box,in that combobox i have two
    values internal and external,if i click
    internal means it hidden the thrid field
    how can i hide the field
    thanks in advance
    bijesh

    Hi,
    Seems that the images in your post are broken, it would be better if you could edit your post and upload the correct images again, others who with the similar questions would get something helpful from it.
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • How do I use one form field to enter data into another form field?

    Does anyone know how I can code a form so that when I select
    a name in one drop-down form field, I can ensure that the person's
    e-mail address will appear in another text field?
    Thanks.

    Thanks Roel,
    I remember that I tried to define multiple DML. but it did not work for Apex gets confused.... which items belongs to which table...
    instead-of-triggers (to process the inserts/updates/deletes) Can you pls, elaborate more on this solution ... ?
    Regards,
    Fateh..

  • How do I cause a form field to raise its blur event?

    I have a web form that displays an editable pdf document.  When a user clicks a button the form will get validated.  If one of the fields being validated has the focus its value will not get updated when I need to do the validation.  For example, if I am validating the First Name field and I type text in it and then click on a button (from the web) to cause validation, the document says the field is invalid because there is no data.  If I hit tab on the field to focus a new field the validation works fine.  How can I cause the field to get updated?  I have tried to create an empty form field and focus to that first but that does not work.

    Nope, I have a button on the website that the user clicks to send a validation request.

  • In Adobe Acrobat XI Pro, how do I validate a form field so that it's numerical value is less than or

    I have one numerical field named "B," and I need to validate it so that it is less than or equal to the value of another field named "A." I can't figure out how to do that!

    OK, so the custom calculate script for field B could be something like:
    (function () {
        // Get field values as strings
        var sA = getField("A").valueAsString;
        var sC = getField("C").valueAsString;
        var sD = getField("D").valueAsString;
        // Only perform the calculation if all fields are filled
        if (sA && sC && sD) {
            var sum = +sC + sD;
            event.value = sum;
            // Alert the user if the sum is more than A
            if (sum > +sA) {
                app.alert("Error message goes here");
        } else {
            // Blank this field if all fields are not filled in
            event.value = "";
    Instead of (or in addition to) an app.alert popup, you could place this message in a read-only form field, and clear it if there is no error condition.

  • How to show/hide build in search box in javascript for LightSwitch html clients?

    Hi
    For each collection on content item, there is built-in showSearch button we can add, once the user clicks on the search, a pre-built-in-search-box shows up above the collection so user can search items in the list. How can I show/hide the pre-built-in-search-box
    in javascript?
    Any help will be appreciated
    The built-in showSearch on content item
    The user clicks the search button, and the pre-built-in-search-box shows up to allow user to enter search terms
    jl

    Hi Joe,
    Welcome to Lightswitch forum.
    If you want to show/hide showSearch button, you can execute this line to show the button,
    this.FindControl("showSearch").IsVisible = true;
    Or execute the line below:
    this.FindControl("showSearch").IsVisible = false;
    Please let me know if there is anything that I can do to help.
    Best regards,
    Angie
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How do I lock some form fields, but not all?

    How do I create a form with interactive form fields where certain fields can be locked after being filled in, and others remain unlocked so the customer can interact with it?
    My workflow looks like this:
    I created a PDF with open form fields for my client to distribute to their salesmen.
    Salesmen receive a call, fill in the information gathered. (name, address, services, price quotes, etc)
    Salesmen email the pdf form to the customer. All fields that they filled in now need to be non-editable, EXCEPT an "I agree" checkbox and a signature line.
    Help is greatly appreciated!
    Michael

    Hi Michael,
    Before I go too deep into a suggestion, I need to know if you are using electronic digital signatures for signing the document? Or, are you expecting the customer to print the document, sign it with a pen and fax it back? The reason I ask is you could use digital signatures to lock specific parts of the document, but if you're not using them I won't bore you with the details.
    Thanks,
    Steve

Maybe you are looking for

  • Idoc error 29 - Error in ALE service

    Hi All, I have this error 29 - Error in ALE service when the idoc is created (No global company code is assigned to the company code). This message comes after 01 - IDoc created Any idea why this is happening? I have created conversion rule to conver

  • How do you set the selected item of a combobox?

    I looked around and didn't find an intrinsic method or function to set the selected index of a combobox. I wrote a function, but I thought I would see what the "best" way of doing it is? The function I wrote is; private function setComboSelectedItem(

  • Bridge Parent Application

    When I try and open a jpg  or png file with Camera Raw, I keep getting and error message saying that a bridge parent application has not been opened. I am then told to open a qualifying app to continue. Does anybody have any ideas what this means. Th

  • SimpleDeserializer encountered a child element, which is NOT expected,

    Hi All, I created a webservice using JAVA. Got WSDL for a SAP Funtional Module(BAPI_MATERIAL_SAVEDATA) and created Java Classes using (WSDL2Java -t XXX.wsdl ). Wrote a Java Client Prog to invoke the services. While Invoking the service from a Java Cl

  • During start Up - Asked to select hard drive Mac?(sometimes 1/5 times)

    Start Up - Asked to select hard drive After getting the apple logo, I get the MacIntosh HD image (with the words MacIntosh HD under it), with an arrow underneath pointing at it. After selecting it , everything run as normal. But once in awhile it ask