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?

Similar Messages

  • 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

  • When we change the non-mandatory field in the form, it doesn't get updated

    Hi... I have one question here..
    If I have non-mandatory fields in a custom form, and when I query the form and change the value in the non-mandatory field and click on save, then it doesn't save. It says 'No Changes to Save'. But, it's not the same for non-mandatory fields.
    Can you please suggest me?
    -vrdida

    VRdida,
    If I understand correctly, you have a non-Required item in your form that has an LOV assigned. While this item is Required=No, it works correctly. When you change the Required property of the item to 'Yes' then it fails. When this occurs, do you get an error message? Are you able to select a value from the LOV?
    It sounds like the Required=Yes property might be preventing you f rom opening the LOV. Try setting the Module property: Defer Required Enforcement = Yes. This is the typical setting in an EBS form. This is what allows you to navigate out of a Required field if the value is NULL, but will give you a Required message when you attempt to save the record if the value is still NULL.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.
    Edited by: CraigB on Apr 6, 2011 11:43 AM

  • Hide a user field from the masks of SAP with SDK

    Hello everyone,
    how I can hide a user field on a form?
    I think there are two solutions:
    1) I can use the event "Form_Load" and change the property "visible" for the user field (bad)
    2) I think the best solution is to modify the configurations of the form, hiding the field for all users.
    I tried this with the example I write below, but the addon correctly change the values ​​in the table "CPRF​​", but still shows the SAP field and then when I close the program, the values ​​are reset again.
    I ask your help please. How I can do?
    thanks
    Info
    SAP 8.81 PL09
    SQL2008 DB
                Dim frmPref As FormPreferencesService
                Dim colPrefs As ColumnsPreferences
                Dim colPrefsPrm As ColumnsPreferencesParams
                Dim col As SAPbobsCOM.ColumnPreferences = Nothing
                '_SboCy  ==> SAPbobsCOM.Company
                '_sboCys ==> SAPbobsCOM.CompanyService
                'get Form Preferences Service
                frmPref = CType(_sboCys.GetBusinessService(ServiceTypes.FormPreferencesService), FormPreferencesService)
                'get Columns Preferences Params
                colPrefsPrm = CType(frmPref.GetDataInterface(FormPreferencesServiceDataInterfaces.fpsdiColumnsPreferencesParams), ColumnsPreferencesParams)
                'set the form id (e.g. A/R invoice=133)
                colPrefsPrm.FormID = "-139"
                'set the user id (e.g manager= 1)
                colPrefsPrm.User = 1
                'get the Columns Preferences according to the formId & user id
                colPrefs = frmPref.GetColumnsPreferences(colPrefsPrm)
                Dim exist As Boolean = False
                'change the width of all the visible items
                For i As Integer = 0 To colPrefs.Count - 1
                    If colPrefs.Item(i).ItemNumber = "U_MYFIELD" Then
                        colPrefs.Item(i).VisibleInForm = BoYesNoEnum.tNO
                        colPrefs.Item(i).EditableInForm = BoYesNoEnum.tNO
                        exist = True
                        Exit For
                    End If
                Next
                If Not exist Then
                    col = colPrefs.Add
                    col.Column = "-1"
                    col.EditableInExpanded = BoYesNoEnum.tNO
                    col.EditableInForm = BoYesNoEnum.tNO
                    col.FormID = "-139"
                    col.User = 1
                    col.ExpandedIndex = 1
                    col.Width = 0
                    col.VisibleInExpanded = BoYesNoEnum.tNO
                    col.VisibleInForm = BoYesNoEnum.tNO
                    col.ItemNumber = "U_MYFIELD"
                End If
                'Update
                frmPref.UpdateColumnsPreferences(colPrefsPrm, colPrefs)
                NothingObj(CObj(col))
                NothingObj(CObj(frmPref))
                NothingObj(CObj(colPrefs))
                NothingObj(CObj(colPrefsPrm))

    Hello Joris,
    I searched on help.sap.com and found the following link, it provides the constraints LDAP and UME sync has.
    http://help.sap.com/saphelp_nw70/helpdata/EN/48/d1d13f7fb44c21e10000000a1550b0/frameset.htm
    Regards,
    Siddhesh

  • Insert Image to table from a Non Database Field

    Hallo,
    db- 9i EE R2
    forms - 6i R2
    OS - W2003
    I have a requirement to upload Images to the database from forms.
    I planned to keep the transaction data and the Images separately in different tables with a reference.
    So, I created the Image field (BLOB)  with a Non Database Field in the Form and use a button to upload the Image. (using READ_IMAGE_FILE).
    I tried to insert the Image to the Actual Image table in PRE-INSERT Trigger at block level.
    But I was not able to Insert the using reference method.  (Cannot compile the PRE-INSERT)
          INSERT INTO IMAGE_TB (ID,IMAGE)
           VALUES (IMAGE_SEQ.NEXTVAL, :ITINERARY_MAP.IMAGE);
    So, Please help me to insert a image to different table from a Non Database Field?
    Thanks

    I don't think it will work with a non-db-item. But you could create a separate block based on your image_tb-table, use read_image_file on the then db-based-column and then simpy issue a commit_form.

  • 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

  • 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,

  • 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

  • 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.

  • 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>

  • 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.

  • How do I take two separate non numeric fields in a acrobat form and combine the data to display in a third separate field?

    How do I take two separate non numeric fields in a acrobat form and combine the data to display in a third separate field?

    You have to use custom JavScripting to concatenate the first 2 fields. You cannot use the first 2 calculation options because they force the values of the fields to a numeric value or ignore string values.
    Possible scripts for the 3rd field are:
    event.value = this.getField("Text1").valueAsString + " " + this.getField("Text2").valueAsString;
    or
    event.value = this.getField("Text1").valueAsString.concat( " ",  this.getField("Text2").valueAsString);
    If you do not want change the separator or not show the separator when on or the other field is empty, you will need to add more code to adjust for change.
    The above scripts will also concatenate number because the field values are read as strings and not numbers.
    There is also a generalized user written function to concatenate up to 3 fields with a separator that adjust for missing data.

  • 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

  • Show/Hide Fields Based on Dropdown

    Hi,
    I am attempting to show/hide subforms with a dropdown selection. I've found a lot of information on the subject, and have ended up with this as my script:
    form1.Page1.Division::exit - (JavaScript, client)
    switch (Page1.Division.rawValue)
       case "1":
       SubformZZI.presence = "visible";
       SubformZZR.presence = "hidden";  
          break;
       case "2":
       SubformZZI.presence = "hidden";
       SubformZZR.presence = "visible";      
          break;
    However, it is not doing anything when a selection is made in the dropdown box. I have the "SubformZZI" initially set as "Visible" and the "SubformZZR" initially set as "Hidden".
    Any suggestions?
    Regards,
    ZeroZone

    You have wrongly referenced the fields in your code.
    Copy and paste the below code in the click event of the Submit button. It should work as expected.
    The code thathas error is commented..
    // First check if there are null values, then construct email using script
    var vEmail = "";
    var vSubject = "";
    var vBody = "Attached to this email is a Field Service Issue - Parts Order Form for Job #" + Page1.JobNumber.rawValue + ".";
    var vName = "";
    var vCC =  "[email protected]" + "," + Page1.RSM.rawValue + "," + Page1.IssueLeaderEmail.rawValue; 
    var vFormat = "PDF";
    var errorMessage = "At least one required field was empty. Please fill in the required fields (highlighted) before continuing.";
    // Check required fields and build error message
    if (Page1.IssueLeaderEmail.rawValue == null)
    errorMessage = errorMessage;
    else
    vSubject = "Field Service Issue - Parts Order Form for Job #" + Page1.JobNumber.rawValue;
    // Check Division field
    if (Page1.Division.rawValue == "Case Division")
         //vEmail = Page1.SendFormToZZI.rawValue;
         vEmail = Page1.SubformZZI.SendFormToZZI.rawValue;
         //vCC = Page1.SendCopyToZZI.rawValue + "," + Page1.CSTZZI.rawValue;
         vCC = Page1.SubformZZI.SendCopyToZZI.rawValue + "," + Page1.SubformZZI.CSTZZI.rawValue;
    else
         //vEmail = Page1.SendFormToZZR.rawValue;
         vEmail = Page1.SubformZZR.SendFormToZZR.rawValue;
         //vCC = Page1.SendCopyToZZR.rawValue + "," + Page1.CSTZZR.rawValue;
         vCC = Page1.SubformZZR.SendCopyToZZR.rawValue + "," + Page1.SubformZZR.CSTZZR.rawValue;
    // If fields required for script are null, warn user and do not initiate email
    if (Page1.IssueLeaderEmail.rawValue == null)
    xfa.host.messageBox(errorMessage, "Sending an email", 0, 0); // Send out a custom error message if any of these fields are null
    else
    // Everything is OK, send email
    event.target.submitForm({cURL:"mailto: "+ vEmail +"?subject=" + vSubject +"&body=" + vBody + "&cc=" + vCC,cSubmitAs:"PDF",cCharset:"utf-8"});
    Thanks
    Srini

Maybe you are looking for

  • Max amount of songs that can be written

    Hi all Not that it is a big concern but more a curiosity. Why when there is 700 megs of space on a CD that you can only burn on average 18 songs. If I was to take that same amount of songs and just burn a data file in toast it adds up to about 100 me

  • How do you change the name of the coloured tags?

    I want to change the name of the coloured tags but cannot see where I can do this.  Is it possible to add a colour to a new tag?

  • Processing a jsp file through a servlet first

    At my company we have a lot of code tied up in servlets for our website. We would like to integrate JSPs along side the servlet architecture. We need to process the html files though both our serlvet architecture (Our website menu system and security

  • 123-reg and natemail form problem

    Hi, I am using natemail for my contact forms and hosting the site on 123-reg. I get an error message HTTP 405 when trying to send an email (using the PHP natemail form). I guess that is because of the host. Is there an alternative way of sending cont

  • Group Messages Split Into Seperate Group Messages

    Problem: Somehow my group messages are being split into seperate group messages.  What is causing this? Examples: Example #1: I sent a message to my Mom, Dad, & Sister, which shows in my phone as a single group message. Mom & Dad have android, Sister