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

Similar Messages

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

  • APEX 4.1 show hide fields based on value of checkbox/radio

    I am trying to successfully hide and show fields based on the value of a clicked checkbox.  I am using a dynamic action, but it isn't working. 
    I followed the sample at Does Oracle Apex 4 enable the following AJAX features? (ie without the dev writing the Javascript) - Stack Overflow
    I even tried a radio button, but it didn't work.  I cannot uncheck the radio button.  What am I doing wrong?  Thank you for any help you can provide.

    Hi,
         create a dynamic action for page load to hide the item which you wanna hide
         now create another dynamic action
         event : Click
         Selection Type : Items
         Items : P1_Check_box(name of the check box item)
         condition : equal to
         value : return value of the check box item (if you click the check box and the return value is 1 then just add 1)
         in true actions
         Action : Show
        Selection Type : Items
         Items : P1_Text_field(name of the field)
         uncheck fire on page load
         create exact opposite false action, that's it.
    Regards,
    Mohan.

  • Show/Hide fields based on choices in drop down menu

    I need help with a script that I cobbled together from an example script; I'm not good enough at java to edit it for my needs.
    I have a form where I would like different drop down fields would be visible/hidden depending on the choices made from other drop down menus.
    If (for example) they select paper type "white" or "color" then "white" will result in a second menu of paper choices, the "color" selection result in them picking the paper wieght, then from there the color.
    My problem stems from the fact that my form is very linited in space, so I would like some of these fields to be essentially on top of each other; visibility dependant on previous choices. I can get to Menu 1 (select paper color) and then Menu 2 if they select white. But there's a problem with setting up a third menu in this series, if they select "color" from Menu 1, then I try to have a drop down for paper weight, all the fields except for Menu 1 are hidden. Playing with the script let me have them all visible, but again, I'm limited on space and can't really spread them out.
    I know I'm missing one small command... somewhere.
    Here is the script I'm working with:
    function control_section_fields() {
        if (event.willCommit) return;
        // Get the value selected in the combo box
        var section = event.changeEx;
       // Hide all of the entry fields
        getField("sec").display = display.hidden;
        // Reset all of the entry fields
        resetForm(["sec"]);
        // Display the fields for the selected section
        getField("sec." + section).display = display.visible;
    where the drop down fields are named "sec.a.dd" for example, and the Export value of different values are assigned as "a", "b", etc.
    Sorry for the rambling. Any help will be greatly appreciated.

    also, if "==" could be roughly translated to "is", "!=" would mean "is not".
    JavaScript is Case sensitive so make sure you did not name your field STATE#1 instead.  It's a pretty common error.  Try not to use special characters when naming fields.  Stick to standards.  I personnally always name fields with capital letters and numbers using identation like
    MYFORM.PLACE.NUMBER
    MYFORM.PLACE.ADDRESS
    MYFORM.SEX.MALE
    MYFORM.SEX.FEMALE
    This is really useful if you have lots of fields related to one another.  You can then apply methods to entire groups of fields in one simple line of code.
    For example this.getField("MYFORM").display = display.hidden would hide all four fields.  It works kind of the same way as folders unside your computer.
    Finally, "#" is generally used as widget identification.  I think this is what happened.  If you copy a field, it retains the same name and some of its charateristics but acrobat will assign them a number called widget.  The original field State will get the identification State#0 in the right pane as it is 0-based.  The copie will be identified State#1.  You must understand that the name of the field is still "State".  Some methods (actions you can code) let you determine the widget number for targetting a specific field from those you copied.  It is not the case here.  So for disambiguation, you should name your fields different name like STATE1 and STATE2, or STATE.1 and STATE.2 if you plan to use what I wrote about earlier.

  • 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 or Hide fields based upon a variable value

    Hi,
    I am a rookie in the field of Acrobat. And my only question is :
    How to Circle a Form Field based upon a variable value .
    For example, If x=1, I want to circle Japan and if x=0, I want to leave it without any change.
    Please help me out. Thanks for your time and help.
    Thanks,
    Vijayvijay77.

    Hi George,
    I am pre-populating a Pdf file based upon the data submitted by the user. And I have to circle options selected in the form.
    I am writing coldfusion code to flatten, populate the form into a PDF form. The end result is the PDF generation with all the data in it.
    The data comes from the database, where I set variable values if any is selected or not.
    Thanks for your reply, I really appreciate your help.
    Vijayvijay77.

  • PM Notification - Hide fields based on other field's value

    Hello experts,
    I am looking for an user exit which allows me to hide some fields based on other field's value.
    For example, I have field 1 and field 2. When I open my notification, if the value of field 2 is 'aaa', field 1 has to be hidden.
    There should be an user exit but I can't find it...
    Thanks for your help!

    Hi everyone,
    Any thoughts? any help is appreciated...
    Thanks

  • Dynamic action - show/hide region based on LOV which returns ID

    Hi folks,
    this should be simple, so someone who works with dynamic actions.
    I have a LOV which is based on below query:
    select OBJECT_ID, KOD
      from x_data x;
    retuns:
       ID          KOD
        492961 BMW
        492964 VOLVO
        492960 MERCEDES
        492963 VOLKSWAGEN
        492959 SKODAItem :P200_KOD is based on LOV which displays KOD and returns ID.
    On my page I have also 1 region called TEST_REGION.
    I would like to set up a dynamic action shich will SHOW/HIDE a TEST_REGION based on selected value in item :P200_KOD (LOV). Region should be showed if displayed (KOD) value of selected ID starts with 'V%'
    By other words, if below query returns any record, then SHOW, else HIDE:
       select *
        from x_data x
      where x.kod like 'V%'
         and x.object_id = :P200_KOD;How should I define a triggering condition for dynamic action, for item :P200_KOD?
    Thanks,
    Tomas

    Hi,
    One way:
    Create advanced dynamic action.
    Name : Hide region
    Event : Change
    Selection Type : Item(s)
    Items(s) : P200_KOD
    Condition : JavaScript Expression
    Value :
    $(this.triggeringElement).children("option:selected").html().substring(0,1) !== "V"Action : Hide
    Fire On Page Load : True
    Hide all page items on the same line : No
    False Action : Show
    Fire On Page Load : True
    Show all page items on the same line : No
    Selection Type : Region
    Region : TEST_REGION
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • How to show/hide total based on selected column in column selector

    Hello,
    Is there a way to show/hide the total based on what column is selected in the column selector? Or alternatively to hide the total based on the column selected? I'm using OBIEE 10g.
    Basically, I have a pivot table with a handful of row variables and one measure. Then I allow the user to select the column variable. The default is to have nothing, which I have achieved using the hidden/dummy column trick (Re: How to add new columns by using Multiselect However, if my pivot table is set to have a total, I now get 2 columns that are the same. When the user selects any other choice (e.g. gender), I would want to see Male, Female and the total. Something like this:
    Default:
    Count
    East 10
    West 20
    Total 30
    Gender:
    Male Female Total
    Count Count Count
    East 6 4 10
    West 14 6 20
    Total 20 10 30
    Any thoughts?
    Thanks!

    I recommend using view selector instead of column selector

  • Auto populate fields based on dropdown selection

    New to forms and needing some insight
    Is there a way to auto populate a series of fields based on the selection of a dropdown box
    for instance;
    chosing a customer's name from a dropdown box would auto populate the address, city,state zip etc...

    Yes, but not easy and you do not want to have a large number of items.
    Programming List and Combo fields in Acrobat and LiveCycle forms - Part 1 by Thom Parker

  • Show/hide field options are grayed out

    If a drop down value is 1, I want to show field #1. If the drop down value is 2, I want to show fields #1 & 2. If the value is 3, I want to show fields # 1 2 & 3, etc. This appears not to be possible; a show hide rule is already created for value 1 and appears unavailable for a new rule for value 2. Any ideas for a workaround?

    Yes you can do this using the hide show logic. In the case you describe you want to use the if any rule rather than the if all rule. For drop down item one the logic is if any (1, 2 or 3) are selected show item one. For item two the logic is if (2 or 3) are selected show item 2.
    Andrew

  • How hard is it to use javascript to show/hide fields. Is it easier to use the action builder?

    I know nothing about javascript and all that ive been using so far has been stuff ive found on here (thank you everyone).
    Using the action builder seems like its gonna be very tedious to do since i have so many subforms that hide, would it be esier to use javascript?

    I know nothing about javascript myself but I just created a form with about 10 different subform that show or hide depending on what the user chooses from a drop down list and I used Action Builder. If we don't know javascript, how can we use it? But Action Builder did a fine job of hiding/showing wherever I needed it. And Action Builder can do more than one thing by clicking that + sign when you are building an action.
    For instance, I needed to place a button in each subform that would close both the field that the person was working in and also the subform on the next page where the information was going into floating fields in a text block that was only visible thru a drop down list text select. I could have never figured out how to do that based on my knowledge of javascript. Thank Adobe for including Action Builder in this version of LiveCycle and I use it all the time. I find it extremely easy to use but it takes a little mental training to think thru the steps of how you can use the menu in Action Builder to make your form do what you need it to do.
    And if all else fails, ask this forum. I struggle for just so long before I come here and ask for help. I always get the answer I need. I hope you will too.
    Good luck,
    Jeanette

  • Show/hide buttons based on templates

    Hi
    1. Is there anyway for hide/show a button (button style template based button) dynamically?
    2. If the button is an image (button style Image) Is there anyway for hide/show a button dynamically?
    Thanks!

    Hello:
    I'll assume that you want to hide/show a button using javascript.
    Generally, if the button template has the '#BUTTON_ATTRIBUTES#' substitution sting defined you can specify an 'id' attribute for the button in the Button Attributes field of the button definition. For an image based button you specify and 'id' in the Image Attributes field. You can then show or hide these buttons using the
    $x_HideItemRow("<button_id>") and $x_ShowItemRow("<button_id>") built in javascript functions.

  • How to show/hide div based on mysql value

    I have a dataset that has a column 'locked' that is a boolean that I want to use to remove a button on a form.  The idea being that it will be set to 1 after a period of time thus removing the buttun that links to an update form and preventing the data from being changed.  Currently, I have the field linked to a check box at the top of the table.  How do I use this to hide the button (or any other html element for that matter) when set to 1 and show the element when set to 0?  I understand I need to creat a php variable from the mysql boolean and then use a if/else loop to hide/display the html but I don't know how to impliment this?  Thanks for any help offered.
    Here's 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, demographics.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 demographics.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) {
          array_push($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//EN" "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=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>
    <p>Spec Rx</p>
    <p><?php echo $row_demographics['px_id']; ?></p>
    <p><?php echo $row_demographics['title']; ?> <?php echo $row_demographics['firstname']; ?> <?php echo $row_demographics['surname']; ?> <?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 do { ?>
    <table border="1" cellspacing="1" cellpadding="5">
      <tr>
        <td> </td>
        <td><?php echo $row_spec_rx['formatted_rx_date']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_id']; ?></td>
        <td>locked:
        <input <?php if (!(strcmp($row_spec_rx['locked'],1))) {echo "checked";} ?> name="locked" type="checkbox" id="locked" value="1"></td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
      </tr>
      <tr>
        <td> </td>
        <td>Sph</td>
        <td>Cyl</td>
        <td>Axis</td>
        <td>HPrism</td>
        <td>HPrismBase</td>
        <td>VPrism</td>
        <td>VPrismBase</td>
        <td>NrAdd</td>
        <td>NrHPrism </td>
        <td>NrHPrismBase</td>
        <td>NrVPrism</td>
        <td>NrVPrismBase</td>
        <td>IntAdd</td>
        <td>IntHPrism</td>
        <td>IntHPrismBase</td>
        <td>IntVPrism</td>
        <td>IntVPrismBase</td>
      </tr>
      <tr>
        <td>R</td>
        <td><?php echo ($row_spec_rx['spec_rx_rsph']<>null) ? sprintf ("%+4.2f",$row_spec_rx['spec_rx_rsph']) : null; ?></td>
        <td><?php echo ($row_spec_rx['spec_rx_rcyl']<>null) ? sprintf ("%+4.2f",$row_spec_rx['spec_rx_rcyl']) : null; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_raxis']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rhprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rhprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rvprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rvprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rnadd']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rnhprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rnhprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rnvprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rnvprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rintadd']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rinthprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rinthprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rintvprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rintvprismbase']; ?></td>
      </tr>
      <tr>
        <td>L</td>
        <td><?php echo ($row_spec_rx['spec_rx_lsph']<>null) ? sprintf ("%+4.2f",$row_spec_rx['spec_rx_lsph']) : null; ?></td>
        <td><?php echo ($row_spec_rx['spec_rx_lcyl']<>null) ? sprintf ("%+4.2f",$row_spec_rx['spec_rx_lcyl']) : null; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_laxis']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lhprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lhprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lvprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lvprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lnadd']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lnhprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lnhprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lnvprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lnvprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lintadd']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_linthprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_linthprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lintvprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lintvprismbase']; ?></td>
      </tr>
      <tr>
        <td> </td>
        <td>User ID <?php echo $row_spec_rx['user_id']; ?></td>
        <td><?php echo $row_spec_rx['user_firstname']; ?></td>
        <td><?php echo $row_spec_rx['user_surname']; ?></td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
      </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);
    ?>

    Thanks for your help, nearly worked but only returned results where the if statement was met ie where locked =0, so I used an additional statement to display something else when when locked=1
    <?php
    if($row_spec_rx['locked'] == 1) {
    echo "button html goes here";
    ?>
    <?php
    if($row_spec_rx['locked'] == 0) {
    echo "something else";
    ?>
    I am sure there must be a more elegant way of doing this!

  • Hide field based in process type - GS_CM Component

    Hello.
    Currently, we need to hide a field in GS_CM/AddDoc view of component GS_CM, because it have to be based on process_type.
    In CMBO node context, we have the object_type of the transaction (TYPEID attribute), but we need the process type to evaluate to hide the field.
    Please, help.
    Regards,
    Renzo.

    Hello!!
    Problem solved!
    We apply the changes indicated in this link:
    http://scn.sap.com/community/crm/webclient-ui-framework/blog/2013/05/13/accessing-component-controller-or-custom-controller-in-a-context-node-class
    Then, we can obtain the guid of the operation and use the FM CRM_ORDER_READ_OW for read in memory the process type of the operation .
    Thanks!
    Regards,
    Renzo.

Maybe you are looking for

  • Ipad2 photos sync issue ios8.1.1

    I have an 64GB iPad2.  I normally sync my photos from iTunes on my PC. I have about 27,000 photos.  My iPad was experiencing slowness issues since upgrading to iOS8.1.  Today I updated to 8.1.1. Photo sync from my PC is not working correctly. It crea

  • Macbook Pro - 10.5.6 screen keeps refreshing?!

    Dear fellow mac user, Tonight (europe) i've been installing the software update 10.5.6 on my macbook pro (late 2006). After installing the software update my mbp keeps refreshing the screen after 15 seconds. When I open up a program it auto shuts dow

  • Aol on my MAC

    I cannot open Import-2 which is all of my old mail....aol is my preferred mail on my MAC. Help please. Thanks.

  • Report Lsting for PURchasing

    Any one know of a quick way to pull out a list of reports available to the PO module? Thank you.

  • To_Char Time Calculations

    Hi My DB version =============== Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production. Issue ================ i have a table in which a column of current time stamp data. im trying to take the time part out of the time stamp fileld