Show / hide content based on access levels (php)

I have an area of a web page that is visible to users with level 'level 1' access registered - I want to change this code and add a second level of access user 'level 2 '.

So basically I want access "level1" and "level2" users to see 'X' content.

Here's the code...

<? PHP if (isset($_SESSION['MM_UserGroup']) & & $_SESSION ['MM_UserGroup'] == 'level1') {? >}

"content here".

<? PHP}? >

I tried modifying the code of what follows, but without success:

<? PHP if (isset($_SESSION['MM_UserGroup']) & & $_SESSION ['MM_UserGroup'] =='level1, level2') {? >}

Any help would be appreciated!

>$_SESSION ['MM_UserGroup'] == "level 1, 2"

You want to test for users who are in a group called '' level 1, 2 ''?  Or test if the user is in the level 1 or level 2? If the latter, then of course, your code will not work. You will need to check each condition.

$_SESSION ['MM_UserGroup'] == 'level2')) { ?>

Tags: Dreamweaver

Similar Questions

  • Anyone know the JavaScript to show/hide content based on the country field?

    Hi, I need to display a different number on a site according to the area of the country (com.au or co.nz). I figured out that the module {module_urlcountrycode} can be used to do this with javascript.

    Because I'm not exactly an ACE to js, is there anyone who could share the code?

    See you soon

    Jerun

    Place the module as a class-{module_urcountrycode} country, then you can simply the elements to give their own class and then you see depend on.

    . Country-nz .nzelement {display: block ;}}

    And by default all elements of the country have a class contryelement or something and all hidden by default.

  • Show/hide fields based on T/F control - only showing or hiding, not both.

    Hi Forum,

    I'm looking to show/hide fields address based on a T/F control (or a single entry check box).

    My online form has a number of business address fields, a T/F control and a number of postal address fields. I want the mailing address fields to hidden when a user clicks on the box 'As Above' (and demonstrated once again if they click this box once more).

    I used the sample code (https://docs.oracle.com/cloud/latest/process_gs/CPRCW/GUID-F3BD3386-F333-45C6-AA56-C77136D169E5.htm) as a starting point for my Web form rule and it works as expected the first time that a user clicks area T/F (i.e. He's hiding the post fields) but it does not work the second time they until it clicks (where I assumed that fields would still be visible).

    The T/F box has the following options:

    true = as above

    false = No

    And my web rule looks like this:

    If (AsAbove.value = true) {}

    PostalAddress.visible = true;

    PostalState.visible = true;

    PostalPostCode.visible = true;

    } else {}

    PostalAddress.visible = false;

    PostalState.visible = false;

    PostalPostCode.visible = false;

    }


    I tried the same thing (with similar results) using a Checkbox control with a single option (according to the example code)

    If (PostalAddressCheckbox [0] .value == 'As Above') {}

    PostalAddress.visible = true;

    PostalState.visible = true;

    PostalPostCode.visible = true;

    } else {}

    PostalAddress.visible = false;

    PostalState.visible = false;

    PostalPostCode.visible = false;

    }

    As verified does not seem to be supported, is there another way to accomplish what I'm after, or I missed something somewhere simple (and y at - it documentation on the T/F control)?

    See you soon,.

    James.

    Hello

    Web Forms address these true-false as the boxes and, as such, in the form of tables.

    You can see if you try to print the TrueFalse value. You should get something like java object lang @XXXXXX

    Try to put the code as follows (in bold and underlined):

    If (AsAbove[0].value = true """""") {}

    PostalAddress.visible = true;

    PostalState.visible = true;

    PostalPostCode.visible = true;

    } else {}

    PostalAddress.visible = false;

    PostalState.visible = false;

    PostalPostCode.visible = false;

    }

    This should do the trick

    See you soon

    José

  • Show/hide menu based on the logged in user

    Hello

    12.1.3 Jdev

    I want to show/hide some menu items based on the logged in user.

    I will explain the current design:

    In my application, I created a menu as below. (It is created using 'Create or Update ADF Menu' file adfc_config).

    ibis_menu. XML

    <?xml version="1.0" encoding="windows-1252" ?>
    <menu xmlns="http://myfaces.apache.org/trinidad/menu">
      <itemNode id="itemNode_home" label="Home" action="goHome" focusViewId="/home"/>
      <itemNode id="itemNode_transaction" label="Transaction" action="goTransaction" focusViewId="/transaction"/>
      <itemNode id="itemNode_customer" label="Customer" action="goCustomer" focusViewId="/customer"/>
      <itemNode id="itemNode_upload" label="Upload" action="goUpload" focusViewId="/upload"/>
      <itemNode id="itemNode_profile" label="Profile" action="goProfile" focusViewId="/profile"/>
      <itemNode id="itemNode_serviceRequest" label="Service Request" action="goServiceRequest"
                focusViewId="/serviceRequest"/>
      <itemNode id="itemNode_report" label="Report" action="goReport" focusViewId="/report"/>
    </menu>
    

    I have a navigation pane in my Pages that use this menu as below:

    <af:navigationPane hint="bar" id="np1" value="#{ibis_menu}" var="menuInfo">
                            <f:facet name="nodeStamp">
                                <af:commandNavigationItem id="ni1" text="#{menuInfo.label}"
                                                          destination="#{menuInfo.destination}"
                                                          action="#{menuInfo.doAction}"/>
                            </f:facet>
                        </af:navigationPane>
    

    Now, I want to hide some items on the menu, depending on the Type of user loggedIn. I have the userType stored in the managed bean.

    How can I get this feature.

    An approach which I think is as below:

    Define a variable for each itemNode in a managedbean(session scope) and who associate with the property ' visible ' / ' rendering ' of the itemNode in the Menu xml.

    Please let me know is a good way to do it or is there another solution better?

    See you soon

    AJ

    So, maybe this can help:

    http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/48-sitemenu-protection-169190.PDF

  • Show/hide panelFormLayout based on the current selection of selectOneChoice

    Hey all,.

    I have a relatively basic question, I'm looking for a clear answer.

    I have a layout with the following structure:

    JSP:root

    AF:panelFormLayout

    AF:panelGroupLayout

    -component selectOneChoice

    AF:panelFormLayout

    AF:panelGroupLayout

    ADF - components

    AF:panelFormLayout

    AF:panelGroupLayout

    ADF - components

    AF:panelFormLayout

    AF:panelGroupLayout

    ADF - components

    I'm looking for the easiest way to show/hide the 3 children of panelFormLayout based on what is selected in the selectOneChoice component.  I've hard-coded these values and set their values like "1, 2, 3" respectively.

    I've already tried defining a ValueChangeListener on the selectOneChoice component, but when I run the page and change the value - it doesn't seem to be hitting my method when I select something.

    Any help would be appreciated.

    JDev Version is 11.1.1.7

    Please add autoSubmit true on the selectOneChoice element and try, it will hit valueChangeListener.

    Also, you can set three PFL render property conditionally in your VCL and make a real at the same time.

    Thank you

  • Dynamic action - show/hide area based on LOV that returns the ID

    Hi people,

    This should be simple, so someone who works with dynamic actions.

    I have a LOV based on query below:
    select OBJECT_ID, KOD 
      from x_data x;
    
    retuns:
       ID          KOD
    ----------------------------
        492961 BMW
        492964 VOLVO
        492960 MERCEDES
        492963 VOLKSWAGEN
        492959 SKODA
    Agenda: P200_KOD is based on LOV that displays KOD and returns the ID.

    On my page, I have also 1 region called TEST_REGION.

    I want to put in place a testament of shich dynamic action SHOW/HIDE a TEST_REGION based on the value selected in the order of the day: P200_KOD (LOV). Region should be shown if displayed (KOD) selected ID value begins with '% V '.
    By other words, if following query returns any folder, then the SHOW, HIDE it on the other:
       select *
        from x_data x
      where x.kod like 'V%'
         and x.object_id = :P200_KOD;
    How can I define a condition of dynamic action fires, for article: P200_KOD?

    Thank you
    Tomas

    Hello

    One way:

    Create an advanced dynamic action.
    Name: Region to hide
    Event: change
    Selection type: item (s)
    Items (s): P200_KOD
    Condition: Expression of JavaScript
    Value:

    $(this.triggeringElement).children("option:selected").html().substring(0,1) !== "V"
    

    Action: hide
    Fire on the Page loading: true
    Hide all items on the page on the same line: No.
    Action of false: show
    Fire on the Page loading: true
    Display all items in the page on the same line: No.
    Selection type: region
    Region: TEST_REGION

    Kind regards
    Jari

    http://dbswh.webhop.NET/dbswh/f?p=blog:Home:0

  • How to show/hide point based on the value of Radiogroup

    Hello

    I'm having a Radiogroup with a yes/no value.
    I have something else to say... P1_TEXT1

    I want to show / hide point P1_TEXT1 based on the value selected in the radiogroup.
    If I select Yes - agenda should be displayed
    If I select non - element should be hidden

    I don't want to send the page.


    Thank you
    Deepak

    on your page go to edit page under the attribute of the HTML body of the Page then you need to put the following text:

    onload="MyFunction;"
    

    You must have tobe your function name Myfunction. Pass the item to your function in your code?

    Could you post your code js here and we could have a look for you?

  • Show/hide fields based on the drop-down list

    Hello

    I'm trying to show/hide subforms with a drop-down list selection. I found a lot of information on the subject and ended up with what 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 does nothing when a selection is made in the drop-down list. I have the "SubformZZI" initially defined as 'Visible' and the 'SubformZZR', originally defined as "hidden".

    Any suggestions?

    Kind regards

    ZeroZone

    Check if the form is saved in dynamic form. File-> save as and choose dynamic for the type of shape...

    Other that that, you should check if you have given the values for the selection of the drop-down list as '1' and '2' in the tab of the control's binding.

    Thank you

    Srini

  • How to show/hide div based on the value of mysql

    I have a dataset that contains a 'locked' column, which is a Boolean value that I want to use to remove a button on a form.  The idea is that it will be fixed to 1 after a period of time, thus eliminating the buttun that connects to an update form and prevent the data being edited.  Currently I have the field bound to a checkbox at the top of the table.  How can I use this to hide the button (or any other html element) when the value 1 and show the item when the value 0?  I understand that I need to create a php mysql boolean variable and then use a loop if/else statement to hide/show the html code but I don't know how impliment that?  Thanks for any help.

    Here is the code:

    <? php require_once('Connections/testmypms.php');? >

    <? PHP

    $currentPage = $_SERVER ['PHP_SELF'];

    $maxRows_spec_rx = 10;

    $pageNum_spec_rx = 0;

    If (isset($_GET['pageNum_spec_rx'])) {}

    $pageNum_spec_rx = $_GET ['pageNum_spec_rx'];

    }

    $startRow_spec_rx = $pageNum_spec_rx * $maxRows_spec_rx;

    $colname_spec_rx = "1";

    If (isset($_GET['pxID'])) {}

    $colname_spec_rx = (get_magic_quotes_gpc())? $_GET ['pxID']: addslashes($_GET['pxID']);

    }

    @mysql_select_db ($database_testmypms, $testmypms);

    $query_spec_rx = sprintf ("SELECT spec_rx.spec_rx_id, spec_rx. FK_px_id, DATE_FORMAT (spec_rx.spec_rx_date, ' % d-% m-% Y') as formatted_rx_date, spec_rx. FK_user_id, spec_rx.spec_rx_rsph, spec_rx.spec_rx_rcyl, spec_rx.spec_rx_raxis, spec_rx.spec_rx_rhprism, spec_rx.spec_rx_rhprismbase, spec_rx.spec_rx_rvprism, spec_rx.spec_rx_rvprismbase, spec_rx.spec_rx_rnadd, spec_rx.spec_rx_rnhprism, spec_rx.spec_rx_rnhprismbase, spec_rx.spec_rx_rnvprism, spec_rx.spec_rx_rnvprismbase, spec_rx.spec_rx_rintadd, spec_rx.spec_rx_rinthprism, spec_rx.spec_rx_rinthprismbase spec_rx.spec_rx_rintvprism, spec_rx.spec_rx_rintvprismbase, spec_rx.spec_rx_lsph, spec_rx.spec_rx_lcyl, spec_rx.spec_rx_laxis, spec_rx.spec_rx_lhprism, spec_rx.spec_rx_lhprismbase, spec_rx.spec_rx_lvprism, spec_rx.spec_rx_lvprismbase, spec_rx.spec_rx_lintadd, spec_rx.spec_rx_linthprism, spec_rx.spec_rx_linthprismbase, spec_rx.spec_rx_lintvprism, spec_rx.spec_rx_lintvprismbase, spec_rx.spec_rx_lnadd, spec_rx.spec_rx_lnhprism spec_rx.spec_rx_lnhprismbase, spec_rx.spec_rx_lnvprism, spec_rx.spec_rx_lnvprismbase, spec_rx.locked, users.user_id, users.user_firstname, users.user_surname FROM spec_rx, users WHERE %s = spec_rx. FK_px_id AND spec_rx. (FK_user_id = users.user_id ORDER BY spec_rx.spec_rx_date DESC, spec_rx.spec_rx_id DESC', $colname_spec_rx);

    $query_limit_spec_rx = sprintf ("%s LIMIT %d, %d", $query_spec_rx, $startRow_spec_rx, $maxRows_spec_rx);

    $spec_rx = mysql_query ($query_limit_spec_rx, $testmypms) or die (mysql_error ());

    $row_spec_rx = mysql_fetch_assoc ($spec_rx);

    If (isset($_GET['totalRows_spec_rx'])) {}

    $totalRows_spec_rx = $_GET ['totalRows_spec_rx'];

    } else {}

    $all_spec_rx = mysql_query ($query_spec_rx);

    $totalRows_spec_rx = mysql_num_rows ($all_spec_rx);

    }

    $totalPages_spec_rx = ceil($totalRows_spec_rx/$maxRows_spec_rx)-1;

    $colname_demographics = "1";

    If (isset($_GET['pxID'])) {}

    $colname_demographics = (get_magic_quotes_gpc())? $_GET ['pxID']: addslashes($_GET['pxID']);

    }

    @mysql_select_db ($database_testmypms, $testmypms);

    $query_demographics = sprintf ("SELECT demographics.px_id, demography. FK_title_id, demographics.firstname, demographics.surname, DATE_FORMAT (demographics.dob, ' % d-% m-% Y') as formatted_dob, title.title_id, title.title FROM demographics, title WHERE %s = demographics.px_id AND demography. (FK_title_id = title.title_id", $colname_demographics);

    $demographics = mysql_query ($query_demographics, $testmypms) or die (mysql_error ());

    $row_demographics = mysql_fetch_assoc ($demographics);

    $totalRows_demographics = mysql_num_rows ($demographics);

    $queryString_spec_rx = "";

    If (! empty($_SERVER['QUERY_STRING'])) {}

    $params = explode ("&", $_SERVER ['QUERY_STRING']);

    $newParams = array();

    {foreach ($params as $param)

    If (stristr ($param, "pageNum_spec_rx") == false & &)

    stristr ($param, "totalRows_spec_rx") == false) {}

    return ($newParams, $param);

    }

    }

    If (count ($newParams)! = 0) {}

    $queryString_spec_rx = '& '. htmlentities (implode ("&", $newParams));

    }

    }

    $queryString_spec_rx = sprintf ("& totalRows_spec_rx = %d %s", $totalRows_spec_rx, $queryString_spec_rx);

    ? >

    < ! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional / / IN" "http://www.w3.org/TR/html4/loose.dtd" > ""

    < html >

    < head >

    < meta http-equiv = "Content-Type" content = text/html"; charset = iso-8859-1 ">"

    < title > Spec Rx3 < /title >

    < script language = "JavaScript" type = "text/JavaScript" >

    <!--

    function MM_goToURL() {//v3.0

    var i, args is MM_goToURL.arguments; document. MM_returnValue = false;

    for (i = 0; i <(args.length-1); I += 2) eval(args[i]+".location='"+args[i+1]+"'");

    }

    ->

    < /script >

    < / head >

    < body >

    Rx Spec < p > < /p >

    < p > <? PHP echo $row_demographics ["px_id"];? > < / p >

    < p > <? PHP echo $row_demographics ['title'];? > <? PHP echo $row_demographics ["FirstName"];? > <? PHP echo $row_demographics ['name'];? > <? PHP echo $row_demographics ["formatted_dob"];? > < / p >

    < p >

    < input name = "Add_spec_rx" type = "button" id = "Add_spec_rx" onClick = "MM_goToURL ('parent', 'add_spec_rx.php'); return document. MM_returnValue' value = 'New Rx' >

    < /p >

    < p > < a href = "<?" PHP printf ("%s? (pageNum_spec_rx = %d %s", $currentPage, max (0, $pageNum_spec_rx - 1), $queryString_spec_rx);? > "> previous < /a > < a href =" <? PHP printf ("%s? (pageNum_spec_rx = %d %s", $currentPage, min ($totalPages_spec_rx, $pageNum_spec_rx + 1), $queryString_spec_rx);? > "> Next < /a > < /p >"

    <? PHP {? >}

    < table border = "1" cellspacing = "1" cellpadding = "5" >

    < b >

    < td > < table >

    < td > <? PHP echo $row_spec_rx ["formatted_rx_date"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_id"];? > < table >

    < td > locked:

    < input <? PHP if (!) ((strcmp($row_spec_rx['locked'],1)))) {echo 'checked' ;}? > name = 'locked' type = "checkbox" id = "locked" value = "1" > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < /tr >

    < b >

    < td > < table >

    SPH < td > < table >

    Cyl < td > < table >

    Axis of < td > < table >

    HPrism < td > < table >

    HPrismBase < td > < table >

    VPrism < td > < table >

    VPrismBase < td > < table >

    NrAdd < td > < table >

    NrHPrism < td > < table >

    NrHPrismBase < td > < table >

    NrVPrism < td > < table >

    NrVPrismBase < td > < table >

    IntAdd < td > < table >

    IntHPrism < td > < table >

    IntHPrismBase < td > < table >

    IntVPrism < td > < table >

    IntVPrismBase < td > < table >

    < /tr >

    < b >

    < td > < table > R

    < td > <? PHP echo ($row_spec_rx ['spec_rx_rsph'] <>null)? sprintf ("%+4.2f", $row_spec_rx ['spec_rx_rsph']): null;? > < table >

    < td > <? PHP echo ($row_spec_rx ['spec_rx_rcyl'] <>null)? sprintf ("%+4.2f", $row_spec_rx ['spec_rx_rcyl']): null;? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_raxis"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_rhprism"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_rhprismbase"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_rvprism"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_rvprismbase"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_rnadd"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_rnhprism"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_rnhprismbase"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_rnvprism"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_rnvprismbase"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_rintadd"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_rinthprism"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_rinthprismbase"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_rintvprism"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_rintvprismbase"];? > < table >

    < /tr >

    < b >

    < td > < table > L

    < td > <? PHP echo ($row_spec_rx ['spec_rx_lsph'] <>null)? sprintf ("%+4.2f", $row_spec_rx ['spec_rx_lsph']): null;? > < table >

    < td > <? PHP echo ($row_spec_rx ['spec_rx_lcyl'] <>null)? sprintf ("%+4.2f", $row_spec_rx ['spec_rx_lcyl']): null;? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_laxis"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_lhprism"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_lhprismbase"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_lvprism"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_lvprismbase"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_lnadd"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_lnhprism"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_lnhprismbase"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_lnvprism"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_lnvprismbase"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_lintadd"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_linthprism"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_linthprismbase"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_lintvprism"];? > < table >

    < td > <? PHP echo $row_spec_rx ["spec_rx_lintvprismbase"];? > < table >

    < /tr >

    < b >

    < td > < table >

    < td > user ID <? PHP echo $row_spec_rx ['user_id'];? > < table >

    < td > <? PHP echo $row_spec_rx ['user_firstname'];? > < table >

    < td > <? PHP echo $row_spec_rx ["user_surname"];? > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < td > < table >

    < /tr >

    < /table >

    < p > < / p >

    <? PHP} while ($row_spec_rx = mysql_fetch_assoc ($spec_rx));? >

    < p > < / p >

    < p > < / p >

    < p > < / p >

    < / body >

    < / html >

    <? PHP

    mysql_free_result ($spec_rx);

    mysql_free_result ($Demographics);

    ? >

    barrydocks wrote:

    I don't know there must be a more elegant way to do it!

    <>

    If ($row_spec_rx ['locked'] == 1) {}

    echo 'button html goes here ";

    }

    else {}

    echo "something else";

    }

    ?>

  • Show/hide buttons based on templates

    Hello

    1 is in any way to hide and show a button (the button style model based) dynamically?

    2. If the button is an image (Image button style) is anyway to hide and show a button dynamically?

    Thank you!

    Hello:

    I'll assume that you want to hide/show a button using javascript.

    In General, if the button model has the sting of substitution ' #BUTTON_ATTRIBUTES # ' set, you can specify an attribute 'id' to the button in the button attributes of the button definition field. For an image based button you specify and 'id' in the attributes of the picture field. You can then display or hide these buttons using the

    $x_HideItemRow ("") and $x_ShowItemRow ("") built in javascript functions.

  • Show/hide fields based on the user's selection

    I know little of Javascript, but my first attempts to integrate it in Acrobat are bothersome. I have created a simple form where the user via a check box the number of people that he or she must register, then the form shows that several fields to complete. I tried to make it work with a single field, before I add more.

    In this example, I'm trying just to get the second hidden registered field if the user checks only 1 person to register. (I already know that I have issues when it comes to hide several fields).

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

    this.getField("Registrant2").display = display.hide;

    }

    Given that I do not know what is the value of exports, try this:

    If (event.target.value! == 'Off') {}

    this.getField("Registrant2").display = display.hidden;

    }

    You can add an else clause so that the field is displayed when the check box is not selected:

    If (event.target.value! == 'Off') {}

    this.getField("Registrant2").display = display.hidden;

    } else {}

    this.getField("Registrant2").display = display.visible;

    }

    If this does ' t work, you don't maybe not the correct domain name. Verify that the console (Ctrl + J) to see all JavaScript errors are reported.

  • Show/hide content from Adobe Acrobat Pro

    I created a Word Document (MS Office 2013) and that you have saved in Adobe Acrobat Pro.  I understand by watching a few videos You Tube how do the interactive document in Adobe tools. However, there is an interactive feature that I couldn't find, if possible, I was hoping you could help me with.  I am an instructor and I get 2 types of training; one on the web and other on-site at the center of my client.  The document I created is our preparation training and it includes questions that relate to both distance education and on-site training; However, some of my clients do not have buy both.  They just bought distance training only or just the site of training only; so, I was hoping I could make this interactive Adobe document by clicking a button or take an action in the document that 'HIDE' any reference to one or other types of training, based on the type they are buying.  Bottom line, if I have a document that contains references both on site and remote training and my client bought on distance education, I want to click a button in my paper that will HIDE all references to on-site training.  I would also like to have the color of the document coded so that not only it hides no reference to the other type of training, it will also turn the background of this document a specific color.  All this is possible in Adobe Acrobat Pro and if not this version, but another version, which version would that be?  Thanks in advance for your answers.

    Post edited by: Michelle Vales

    Hi mlvales

    Please see this KB doc. helps Acrobat | Create and distribute PDF forms, it contains steps & tutorial to create interactive PDF Forms.

    Kind regards

    Nicos

  • Show/Hide button, based on the user variable

    I have a variable "videoDone" which is set to 1 when the SWF on my Captivate slide is completed.

    My next button is hidden when the slide is displayed (Next hidden if the button videoDone = 0)

    How to make the next visible button without having the user to interact with something on the slide? I want to not visible when videoDone = 1?

    I can make it appear if I add a button to the screen that has a fast action (if videoDone = 1 show Next_button) but I want the next button to simply appear.

    You need an event to trigger an action, and Captivate has no time-based events. It is impossible with the timeline?

    Events / Actions (Advanced) - Captivate blog

  • show/hide fields based on the drop-down list of choices

    I have a field from the drop-down list with three choices. Based on the selection, I need a specific text form field to appear and the others to stay hidden. (Or if it makes the code cleaner, the resulting field could be a drop-down list, too, with the selected choice.) I don't know Java well enough to extrapolate the code from the examples online and it fit my forms. I can provide an example of form. Thanks in advance for your help.

    There are ways to run this.  the easiest for you would be to add this script to the event (calculation of the Properties tab) to calculate the field that must be hidden.  Take notes, all "/ /" is some tips for you to understand the code.  You will need to put this script in all the areas you want to replicate the behavior, change the value depending on what you want to accomplish.  the word 'event' means myself to make you understand.

    If (this.getField("dropdown").value == 'put value here') {//replace "drop down" with the name of the drops}

    Event.Target.Display = display.visible;

    }

    else {}

    Event.Target.Display = display.hidden;

    }

    This works if you have a small amount of fields.  If you manage to have a large number of similar fields, let me know because there are other, faster ways.

  • Show/hide subform based on the value of digital field

    Hi all


    I created my first form in LiveCycle Designer, but jammed with coding. Any help would be greatly appreciated.

    In the attached form, based on the value of field digital "number Total points" (calculated from the user of entry), I want two things to happen.

    The 'field' text should display different text depending on the points,

    • Less than 10 points is "beginner."
    • 10-14 is "intermediate."

    and just like that...

    If the total number of points is less than 10, 'Course for beginners' and 'Language' DropDownList must appear.

    Is there a way to do this? I tried posting 'If' 'else' statement, but it does not work. I looked in the previous discussions, but cannot find that anything will be based on the numeric value.

    You are looking for assistance.
    R

    The joint responds to your needs. The JavaScript on the TextField1 calculate event anime.

    Form1. #subform [0]. TextField1::calculate - (JavaScript, client)

    If (NumericField1.rawValue! = 0) {}
    If (NumericField1.rawValue< 10)="">
    DropDownList1.presence = "visible";
    DropDownList2.presence = "visible";
    this.rawValue = "beginner."
    }
    else {}
    DropDownList1.presence = 'hidden ';
    DropDownList2.presence = 'hidden ';
    If (NumericField1.rawValue< 15)="">
    this.rawValue = "middle";
    }
    else {}
    this.rawValue = "";
    }
    }
    }

    Steve

Maybe you are looking for