Make a read-only text field open by using button and javascript

Hello
I have a form with text fields that I will pre-populate with data. The text fields will be read-only by default. I want to make it so that when a user wants to make edits, he will need to click on a button and in turn, the text field's background will turn gray and he can make edits to the text field. I can already make the background turn gray but I cannot make the text field open.
This is the code that will run after the button is clicked:
color.ltGray = new Array("G", 0.75);
this.getField('TestField').fillColor = color.ltGray;
this.getField('TestField').access = "open";
The text field's background turns gray but it is still read-only. Any ideas?
Thanks in advance!

Here's the online version of the Acrobat JavaSript documentation: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/wwhelp/wwhimpl/js/html/wwhel p.htm?href=JavaScript_SectionPage.70.1.html&accessible=true
It's also available as a PDF in the Acrobat SDK.
Regarding your other question about adding a PDF to another, do you want to add it as an attachment, or add the pages from one PDF to another?

Similar Messages

  • Read-Only Text Field Using JavaScript Code

    I'd like to make a text field read-only by using JavaScript and also having IF & ELSE statements.
    I want it to be like this:
    if the answer from the dropdown menu is YES, then the text field is read only but if the answer is NO then the text field is fillable.
    Thanks in advance

    Use this code as the custom validation script of the drop-down in question:
    this.getField("Text1").readonly = (event.value=="Yes");

  • Help with read only text field

    trying to refine a KW form
    I don’t want user to enter value in a box so I made it read only.  $<input name="proptax" type="text" size="10" readonly="true">
    Validation says:
    "true" is not valid value for the "readonly" attribute in any of the currently active versions. See the above warnings for more details.[HTML 4.0]
    So now what?

    DW's validation gives me an error.  W3C  says it's ok.  I wonder why DW (v8) disagrees.
    Actually I 'disabled' the field instead which actually works better for me but they all behave the same,  errors in DW  and ok in W3C
    Thanks

  • Focus on Read-only Text field = accelerators not working

    Pretty much explains the problem.
    In a desktop Application i am developping are different accelerators defined which are working as long as the Editable fields of the frames do have the focus.
    If the Focus is on a read only Field or one of the internal Frames (or somewhere else where you cant type in data) ALL of the given accelerators dont work.
    I just ask this in case of its a known bug (i havent found it as a bug) because since we have our own framework to write swing applications it could also be a bug of that;)
    Thanks for every reply.
    Regards
    Balsi

    Convert the Price text type to number type.it will work.
    check this
    http://sharepoint-works.blogspot.in/2012/05/caml-query-to-get-data-from-sharepoint.html

  • Read only Text Field for a Date Picker?? (how to)

    Hi,
    We have BPM Object presentations where we need to accept date values and the presentation puts Date Picker by default. But the text box associated with the date picker is editable. Is there a way so that I can make it non-editable so that i can enforce the data entry via date picker only (a typical use case)?
    Thanks in advance,
    user8702013.

    Hi,
    In the BPM Object's Presentation editor for the presentation, click the date field. On the right, click the "Properties" tab. Change the field's "Editable" property for this presentation from the default ("Yes") to "No". This only effects this one presentation.
    Hope this helps,
    Dan

  • How can I have a checkbox that a user checks and populates a field with read only text, then if another checkbox is checked it will allow user text input

    Hi
    How can I have a check box that a user checks and populates a field with read only text, then if another check box is checked it will allow user text input into that same field, her is my javascript
    var a ="Not Applicable"
    if (this.getField("Do").value == "Yes")
    a=""
    if (this.getField("DoNot").value =="Yes")
    a=a + ""
    event.value=a
    say if the "Do" cb is checked, Not Applicable would populate the text field, and if the "DoNot" cb is checked it would allow user input into the same text field, the javascript I have will not allow user input,
    thanks for any help I am new to javascript

    Are these fields mutually exclusive?

  • Read-only/hidden fields in self request form

    I have a prepop plugin for one of the field which generates a number from an oracle sequence, i don't want requesters to modify it, so I would like to either hide it or make it read only.
    Also, can i put some label/help text to put in some instructions?

    Have a look at the following link for section- *19.1 Step 1: Creating a Request Dataset for the Resources* -> *19.1.1.3 The AttributeReference Element* ->Optional Properties -> approver-only
    http://download.oracle.com/docs/cd/E14571_01/doc.1111/e14309/request.htm#CIHGBGBC

  • Read-Only text area

    Hi,
    I'm using a text area to display a longer read-only text. It should display only 5 lines and, if the text is longer, it should be scrollable. Works fine as long as I set the attribute Editable to true. But if I set it to No (because it should be read-only), I get the following problems:
    - It does not show only the 5 lines anymore, but the complete text without scrollbars.
    - It shrinks the size of the text area, so that it fits the text inside. You can see that looking at the borders. But I wanted to have the borders at the original size independent of the text.
    Does anyone knows, how to solve that?
    Thanks&Regards
    Matthias

    to the best of my knowledge, if you make it read-only you cannot have the scroll bar enabled. and whatever you explained is the expected behaviour!!
    But, i have a workaround under three conditions:
    1. if you need the scroll bar
    2. if you want the size of it as in the initial state - without disturbing the existing size and format of page
    3. you wish to retain the value
    keep the value of the text area in a temporary object and pass it to the reference attribute on submit of page. (here we are just retaining the value and not making it read-only)
    this helps in keeping the format of page undisturbed!!
    HTH
    Sharma

  • How to make JTextArea read only

    I want to make JTextArea read only so that you can only append text at design time and not at run time and so the user can not delete text in the text area.

    You can use the setEditable(boolean) method. I think that it's the best way.
    Sebastien

  • PowerPoint Makes File Read-only After Saving

    Hello all,
    A couple of end users have encountered the above problem. They make changes to pptx files and after the file saves, the file becomes read only (says so on the program window). If they are not paying attention, then any other changes they make to the file
    need to be saved to another file, which needless to say, is very annoying.
    They have saved the file, file becomes read-only, then if they close the file and open it back up, it's fine; they can edit and save.
    It happens sporadic.  Could it be an autosave happening at the same time? Any others experiencing this?
    Any help would be appreciated!
    JB

    Hi
    Thank you for using
    Microsoft Office for IT Professionals Forums.
    From your description, I understand that you want to allow changes by more than one user at the same time in PowerPoint . If
    there is any misunderstanding, please feel free to let me know.
    In Microsoft PowerPoint 2010, multiple authors can simultaneously change the same presentation stored on a server.
    The new co-authoring functionality in Microsoft Office 2010 makes it possible for multiple users to work productively on the same
    document without intruding on one another’s work or locking each other out.
    More detailed information you can refer to this article
    Work on a presentation at the same time as your colleagues
    http://office.microsoft.com/en-us/powerpoint-help/work-on-a-presentation-at-the-same-time-as-your-colleagues-HA010344967.aspx#BM2
    Please take your time to try the suggestions and let me know the results at your earliest convenience. If anything
    is unclear or if there is anything I can do for you, please feel free to let me know.
    Hope that helps.
    Sincerely
    William Zhou CHN

  • Managing External Content Types - make it read only?

    I have a simple SharePoint list with an External Data column. When I edit item where the corresponding data was removed from the External Content Type I get this error:
    No exact match was found. Click the item(s) that did not resolve for more options. You can also use Select button to
    choose External Data.
    I assume this is by design and I cannot delete underlying data and keep the value in the list - is this correct?
    So my question now - is it possible to keep that info in the external list but disable in a picker so new records cannot be created with that particular value? How do I do it?
    Thanks,

    I don't understand the question exactly, could you restate it.  Sorry mate, I might just be braindead.
    But, as far as the issue, it is by design.  the column is a lookup columns which essentially ties to the external data.  if that data is removed, the column on your simple list becomes invalid and any edits of the simple list item will require
    it to be changed.
    are you wanting to make the ECT read only?  that's simple enough.  you can pop open SPD and edit the ECT, then remove the C/E/D operations (create/update/delete).  That will not, however make it read-only in any other systems that access that
    external data, as I assume its not just SP or else it wouldn't be external
    Christopher Webb | MCM: SharePoint 2010 | MCSM: SharePoint Charter | MCT | http://christophermichaelwebb.com

  • How to enable extension button of select-options but make it read only

    Hi all,
    I have select-options with extension on my selection screen. It has to be read only. But when I give screen-input = 0, even the extension button is disabled. So the user cannot see multiple default values of that field. How should I enable the extension button and still make it read-only.
    Thanks in advance.
    Vasu

    Hi, try below sample code:
    data: gv_bukrs type bukrs.
    SELECT-OPTIONS s_one for gv_bukrs.
    at SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        if screen-name = 'S_ONE-LOW' or screen-name = 'S_ONE-HIGH' .
           screen-input = 0.
           MODIFY SCREEN.
        endif.
      ENDLOOP.

  • Generally when creating a Word file from either a Mac or Win7 pc and opening it on two different machines (either one first) it always prompts that the file is open and will be opened as read only. However opening a CSS file does not prompt that it is alr

    Generally when creating a Word file from either a Mac or Win7 pc and opening it on two different machines (either one first) it always prompts that the file is open and will be opened as read only.
    However opening a CSS file does not prompt that it is already open on or from any machine which is causing code edits to be lost.
    What we found from out testing:
    - The file can be saved from one user to the server and WILL NOT PROMPT on other machines until the saving machine has the Dreamweaver program closed completely
    - The file can be closed and  Dreamweaver minimised to the launch bar but it still will not register on other machines that it has been changed.
    - Also, until the  Dreamweaver program is closed on the machines, it will continue to open it's saved version of the file. 
    Example Scenario:
    - User 1 opens test.css (which is 2000 lines) and adds some code to the end of the file to bring it up to 2500 lines
    - Meanwhile User 2 opens test.css as well (opens as 2000 lines as User 1’s edits have not yet been saved) and adds in code to bring it to 2300 lines
    - User 1 saves his file and closes it - but  Dreamweaver is still open.
    - User 2 also saves his file and leaves  Dreamweaver  open.
    - The server will report the size and last edit of the file the same as User 2 as he was the last person to save it (and if you open from the Win7 Machine it will show as User 2’s 2300 line version)
    - If User 1 then open's the file again (from either the 'recent' in Dreamweaver OR clicking on the file directly in Finder...which version opens.... The version that User 1 saved! Not the true version on the server, but the version that User 1 edited and saved with 2500 lines in it.
    - Same for User 2, he will open 'his' version with 2300 lines in.
    Other information:
    - Files are opened directly from the server
    - Sometimes the users will save incrementally and re-open
    - Most of the time users will save incrementally and keep the files open
    - The users will never not save incrementally and just save when closing the file once finished
    - The users are usually working on the files all day
    - It is always the bottom lines of code that are lost. It could be a case of the two versions being mixed up and cutting off the newly added lines based on the line count (possibly).
    It is as if Dreamweaver is holding a cache of the version locally and then only properly looking back to the server when it has been completely closed. It is very difficult to see how the server is causing such an impact on these files, there are very few logs which are giving any indication to the root cause of the problems.
    Anyone know if this is a known issue?
    Is there a way that there can be a featured implemented on the server that doesn't allow another user to open a file if it is already open on another machine?
    Thanks

    Your server file handling has nothing, and really nothing to do with Adobe software. If files don't get locked for (over-)writing and/or lose connection to the program opening them, then your server is misconfigured. It's as plain and simple and that. Anything from "known file types"/ file associations not being set correctly, MIME types being botched, crooked user privileges and file permissions, missing Mac server extensions, delayed file writing on the server, generic network timeout issues and what have you. Either way, you have written a longwinded post with no real value since you haven't bothered to provide any proper technical info, most notably about the alleged server. Either way, the only way you can "fix" it is by straightening out your server and network configuration, not some magic switch in Adobe's software.
    Mylenium

  • How to right align a read only numeric field in a panel form layout

    Hi, does anyone know how to right align a read only numeric field in a panel form layout? I am using: Style Class = AFFieldNumberMarker, but it only seems to work if the field is disabled. Disabling the field gives it a difference appearance that does not look right on our forms. These are calculated fields, which cannot be modified, so read only is necessary.
    I have looked online for some answers, and it seems that others are having similar issues.
    I have tried different combinations for the properties, but so far I cannot get it to work.
    Thanks
    Judy
    I am using JDEV 11.1.1.5

    Sorry for the delay in my response. Here is the code
    <af:inputText value="#{bindings.TotalAirlineCostEst.inputValue}"
    label="#{bindings.TotalAirlineCostEst.hints.label}"
    required="#{bindings.TotalAirlineCostEst.hints.mandatory}"
    columns="#{bindings.TotalAirlineCostEst.hints.displayWidth}"
    maximumLength="#{bindings.TotalAirlineCostEst.hints.precision}"
    shortDesc="#{bindings.TotalAirlineCostEst.hints.tooltip}"
    id="it20" readOnly="false"
    disabled="true"
    styleClass="AFFieldNumberMarker">
    <f:validator binding="#{bindings.TotalAirlineCostEst.validator}"/>
    <af:convertNumber groupingUsed="true"
    pattern="#{bindings.TotalAirlineCostEst.format}"
    type="number"
    maxFractionDigits="0"/>
    </af:inputText>
    thank you,
    Judy

  • OVS on read-only input field

    OVS will not allow me to change the value of a read-only input field.  If the input field is set to read-only, the OVS selection table does not display an 'OK' button, only close.
    Value cannot be copied (field is not editable)
      I do not want the field to be editable on the screen, but only allow input via the selected row in the OVS.  Any suggestions?
    Edited by: Bob DeNuto on Jul 31, 2008 1:22 AM

    Using Dictionary Search Help and OVS in this case will disable the Copy button and you don't have any control.
    Use Freely Programmed Value Help, this will solve your problem
    https://wiki.sdn.sap.com/wiki/display/WDABAP/Freelyprogrammedinput+help
    how to provide f4 help to the read only input field
    Abhi

Maybe you are looking for

  • Mac gone slow after upgrading to 10.9.4

    13/07/14 3:20:04.705 am configd[17] New network configuration saved 13/07/14 3:20:04.000 am kernel[0] en2: promiscuous mode enable succeeded 13/07/14 3:20:04.000 am kernel[0] flow_divert_kctl_disconnect (0): disconnecting group 1 13/07/14 3:20:04.723

  • Not so Smart app

    Having a nightmare with the BT SmartTalk app. It works great until you need to change or remove a user and then you end up tearing your hair out. I have the app on my iphone and it works fine. I added my son as a household member so that he could hav

  • How to uninstall programs

    my macbook says that my start up disc is full and that i need to uninstall programs. i have no idea how to do that. for some reason i thought once i put the program from applications to the trash bin that that would deleted them (after i delete the t

  • (-50) Error message in itunes?

    Hi there I recently had to restore my ipod. Then when it tries to sync it gets an error message (-50). It seems to happen on certain songs only? It gets to a song during syncing and then just hangs there and eventually displays the message? I then re

  • Online backup failing regularly... Need Help

    Hi All, Previously my online backup was success. But i dont know from one week my backup is failing regularly. Kindly help me regarding this. Please find error log below. -- Job startedStep 001 started (program RSDBAJOB, variant&0000000000096, user I