Save event - make text read-only field if not empty

I have a document which must have read only 1 field if it is not empty when the form is saved. I have the Document Actions 'spared' configured to run a script that contains only:

getField("DepositDue").readonly = true;

The problem is, if I save the document so that it can be filled and saved by adobe reader, this field is changed to read-only. What I need is an if statement to check if this field is empty first, but do not know how to do in this regard. The extered text is a date in the format of date as well.

The following works for me in paper will save the event, but not the Document spared:

var f = getField ("DepositDue");

f.ReadOnly = f.valueAsString;

Tags: Acrobat

Similar Questions

  • How to make text read-only once it is recorded and distributed on the ground?

    How to make a read-only text field after it is registered adistributed d?

    LiveCycle Designer ARE 8.2

    Exit this JavaScript code on the event:

    textField1.access = "readOnly";

    This works after the user loses the focus on the field, but after it is saved and distributed, this field is no longer "read only".

    I need to have staff insert information into a text field and try it then distribute to clients, and these fields must be protected.

    How do you do that?

    No... .it has to be there to be a schema valid... but it is not used by the product offline.

    Paul

  • Checkbox puts other text read-only fields

    I'm new to creating forms in Adobe, so bear with me.

    I have created a form where if the user selects a certain checkbox, it would have to be empty on a section of the form.

    If someone could help with this it would be greatly appreciated.

    Side note: I suck at Java... my bad.

    This is JavaScript, you must use, not Java (sound similar, but very different).

    For do you you can use something like this code as action box MouseUp:

    if (event.target.value=="Off")  { // If the box is not ticked, enable the other field
        this.getField("Text1").readonly = false;
    } else {
        this.getField("Text1").readonly = true;
        this.getField("Text1").value = "";
    }
    

    This is just an example, of course. You will need to adjust the name of the field and maybe add more lines if you want to do the same for other fields.

    If you have a long list of fields to add then it may be using a loop, so you won't need to copy & paste the code several times.

  • Read only fields become unlocked when PDF is open again

    I created a quote that is has several buttons on it.  The buttons perform many actions such as the Add/Remove lines, add or remove columns, etc.  There is a "Finalize" button at the bottom of the form that locks all the text fields and hides all buttons so that they cannot be changed by the customer when the quote is sent to them.

    The problem occurs when the form is completed, saved, and then reopened.  All the buttons become visible again and the text field becomes editable when the PDF file is reopened.  Is there a way to keep the hidden buttons and text read-only fields?

    Thank you.

    The "State" of the form is not saved automatically. Under the form of file/properties/Defaults make the checkbox 'Keep changes to the scripts to form when registering' is set on automatically.

    Paul

  • API import block and read only fields

    I want to create a custom field for a Contact that will be read only in the interface user of E10, but for that I can import values via import bulk API.  I created my domain via the REST API as a text type and marked read-only; It appears as such in the user interface.  I then create an import via the API definition in bulk and run an import.  The status of the synchronization ends as "warning", and my read only field is not filled.

    I tried the same import API code block using custom fields not unalterable and he succeeds, then I'm sure it has to do with the read-only field.  Is there a way to accomplish what I'm trying to do?

    UPDATE: I received confirmation from someone of Eloqua fields read-only cannot be set via the import bulk API.

  • Advanced table read only fields

    Hello

    I have a table advanced based on VO.

    I want to do some column read-only fields.

    I did like that.

    OAApplicationModule am = oapagecontext.getRootApplicationModule ();

    OAViewObject vo = (OAViewObject) am.findViewObject ("SearchHeaderVO1");

    Line SearchHeaderVORowImpl = null;

    int fetchedRowCount = vo.getFetchedRowCount ();

    Rank [] rows = vo.getAllRowsInRange ();

    for (int i = 0; i < fetchedRowCount; i ++) {}

    If (rows [i]! = null) {}

    System.out.println ("In makeReadOnly");

    Rows [i] .setAttribute ("EntityCode", Boolean.true);

    }

    }

    What is the right way to go?
    Thanks again
    Varun

    Varun,

    1. create an additional attribute in your VO of Boolean type. ex:-name: customReadOnlyAttr

    2. set this attribute value as the property readonly for each field in the page. as a ${oa. SearchHeaderVO1.customReadOnlyAttr}

    Now in your code, set the value of this attribute programmatically, based on any desired conditions.

    What is the State you want to make these fields readonly?

    See you soon

    AJ

  • Registration number read only fields of alignment

    APEX 4.0.2 / RDBMS 11G R2

    I would like, in a form of the APEX, aligned to the right a read only numeric value which is calculated by my application.  According to the doc of the APEX, this feature is not available under number of alignment "does not apply to read only fields and the fields where the element HTML Form attributes are specified.

    Does anyone know of a workaround for this problem?  Ideas, suggestions and/or recommendations are welcomed and appreciated.

    Thanks in advance,

    John S

    Hi John,.

    You can try adding some css yourself:

    Add a class to your form field in the Form Element Classes fields HTML CSS attribute and add a property text - align for this class in your css file, or in the header html region.

    For example, put 'rightAlignField' in the attribute of the form element to HTML CSS Classes and add

    to the header html form regions.

    Kind regards

    Vincent

  • Is there a way to make downloadable read-only/no PDF files in Acrobat format?

    Hi all, I am new to the Forum and have a question about the creation of a PDF file that is read-only and also not downloadable. I know that I can do the part read-only by using the security settings, but it seems not be a setting that would prevent someone from copying the PDF file should be displayed on a Web page?

    Any who have and experience in this field? My employer wants to make our PDF files online-visible only on the webpage and non-prontable, but I think that it is perhaps something that should be done at the level of web design. Any help would be appreciated to gratly! Thank you!!

    No, if make you it available on a web site, which means that they are necessarily available for download. There would be no way for someone to see if they were not.

    There are possible restrictions with digital rights (DRM) products, such as Adobe LiveCycle Rights Management, but at a significant cost. For more information, see: http://www.adobe.com/products/livecycle/rightsmanagement/

  • How do I run a script only if the field is not empty

    How do I run a script only if the field is not empty

    Well well, thanks to you, I had a full date on separate days, the months and the years in different areas. But now, I have a problem, as PDF has several fields calculated with script if you enter the date calculated by all other areas, which have separated and undefinied gives me does not want to put this to not always use this field. I tried to put one conditional if else but I sale. Esto, this is what I'm wearing

    var datesol = event.value;//declaramos the variable

    If (datesol = "") {}

    this.getField('yearsol').value = "";

    this.getField('monthsol').value = "";

    this.getField('daysol').value = ""}

    else {}

    var array_datesol = datesol.split("/"); / / separamos esa con date the split funcio

    this.getField('yearsol').value = array_datesol [2];

    this.getField('monthsol').value = array_datesol [1];

    this.getField('daysol').value = array_datesol [0];

    With what they do not separate them now.

    Help please

    As mentioned, you cannot use

    If (datesol = "")

    because that sets the value of datesol to «» (you will need to double for the comparison operator =)

    If you want to run code only if it is NOT empty, while it takes:

    If (datesol <> "")

  • PDF form javascript to read only field using the button

    Please let me know the PDF form JavaScript to make the selected fields (text field, dropdown list, etc.) read-only button.

    Do you want your button to read-only?

    Let's start with Acrobat JS Reference.

    do all the fields in a form read-only;

    var oField; variable field processing;

    Browse the form fields;

    for (var i = 0; i)< this.numfields;="" i++)="">

    treat each domain name;

    oField = this.getField (this.getNthFieldName (i)) .readonly = true;

    }

  • Make a read-only form in fillable

    I have a form that has mysteriously become unalterable.  I know I can go through field by field and uncheck "read only".  However, I am faced with forms of insurance that have lots of fields and I was wondering if I can change a setting for the document, or should I go through each field individually to achieve?  I ask because clearly someone didn't cross and render each field read-only.  The form is to be completed recently.

    You can select several fields at the same time and press enter/return to bring up the field properties dialog, or you can use a script to loop through the entire field and set the readonly property to:

    Script button (mouse), link, bookmark, or a JavaScript console

    for (var i = 0; i)< numfields;="" i++)="">

    var fName = getNthFieldName (i);

    Make the field not readonly

    getField (fName) .readonly = false;

    }

    But the fields do not get the value of readonly for no reason. It is difficult to say what caused this without looking at the file.

  • Completely make a read-only folder?

    Not just make a folder read-only, but making it so that nobody can make a change and feel that changes without saving it in a word sound, completely making it read-only. The contents of folder and that's it.

    Thanks for the comments, but my supervisor said they want the files to remain in the format they have. There is also an entire folder not only a couple of files. He wants everything to protect without changing the way the documents are now. Any thoughts?

    Hi Carlton,

    I suggest you try to influence policy from the file by changing the permission to this subject, but I doubt it will work because for all I know, the rights management services active directory has the ability to change the rights of a certain file/document, but please try it

    First, right-click on a document, and then choose Properties. In properties, go to the sharing tab. Click the user you want to change the permissions on a document. the reading selection. When you are finished, click share

    Then right-click on the file and then go to the Security tab, under the Security tab click on the user you want to change permissions. Check the read checkbox and uncheck the others. When you're done click apply then ok

  • How to disable the warning of validation on the calculation (read-only) field in the table

    Is it possible to add a line in a calculation script (JavaScript) that prevents a dialog box of a calculation field validation?

    Scenario:

    • Working with fields in a table inserted.
    • In each line, I have a couple of fields that the user has entered. These fields have a Validation model has allowed that the user must enter the data correctly.
    • There is a calculated field based on the data entered by the users. It is this field that throws a warning dialog box "the value entered for Total_Row1 is not valid. "To ignore the validations for Total_Row1, click on ignore.

    Even if I turn off the Model Validation on fields used for the calculation of the warning dialog box always appears. So, it seems to be isolated in the field of computing.

    The calculation area displays the time and I got it originally set as a Date/time field, but also tried to use a text field (as the calculation should appear as 0:45 for 45 minutes in this area).

    I have a suspicion that the warning appears only because I used an array for formatting fields, as I used similar validation profiles and other calculation fields and see not the message when the fields do not appear inside the table.

    I think of easier workaround would be to disable validation for this particular calculation field, but I have no idea how the script that. Any help appreciated lot.

    CARI

    I discovered the problem.  In a word: it was a mistake by naming the fields.

    • I have fields named with line numbers in the field name (for example FieldName_Row1).
    • and fields calls with FieldName_Row1.formattedVallue must have triggered some confusion.

    As soon as I removed the word 'Row' of file names, the question of the warning dialog validation mystery Adobe Acrobat for the calculation field have disappeared.

    Ago about 3-4 hours of my life that I won't be back... ha - ha but if someone else has the problem, I thought I better share my discoveries

  • Read only field select set to true but content can remove?

    Hi experts,

    I have a problem when I check-in then I select read-only, but after successfully check-in I can remove this content please tell me why it is possible, I want that he can't delete if I chose True in field read-only?

    Thanks for the intention,

    I think that you have not to my question, Question that is 'defeated shaped when I chose the field read-only as true' content must not removed by any one. But I can remove it. Then things is - so it is possible at the University Complutense of MADRID does not allow as described on the page

    Using folders and WebDAV - 11g Release 1 (11.1.1)

  • How can I jump tab stops to read only fields?

    Hello

    I have created a form using Livecycle ES2 and have a Q.

    I have a Yes and no box that, once Yes is clicked does another check box and the date field read-only. When I click No., they are open for data entry. It works fine, but I found when I click on Yes and then press tab, it always stops on the deposits of only reading.

    Logic and well... very well anything else I did know the fields.

    Is there a way to blow up the field if it is read-only? I guess it would be in the sense of when the field is entered and is read-only, it will automatically go to the next tab stop.

    Any suggestions?

    Try, yourField.access = "protected" instead of "readOnly"

    Kyle

Maybe you are looking for