Lock text fields only if they are filled at

Hello all and thanks in advance for your help!

My Question:

When I click on a button (btnLockFields), I would block only text fields that have the actual text in their filled. The same text fields are met every time, so it must be flexible. Before blocking text fields, I need to be prompted to enter a password. I will send this form to others so I need the password button to keep other users fixed.

I'll put form security so that others with Adobe Acrobat does not mess with the form.

Is this possible to do? Thanks again!

I've seen this post but it works for specific areas, unless there is a way to fix the code works with what I need:

http://forums.Adobe.com/message/4695376

OK, you can try something like the following, but I have not tested. It is intended to be used in a bookmark and don't try to unlock after that that they have been locked:

Lock all the non-empty fields

(function () {}

Your chosen password goes here

var pw = "1234";

Ask the user the password

Var RESP = app.response({)

cQuestion: "to lock the non-empty fields, enter the password:",

CTitre: "password",

bPassword: true,

cLabel: 'password '.

});

switch (RESP) {}

case pw:

Scour the fields and lock boxes and non-empty text fields

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

var fName = getNthFieldName (i);

var f = getField (fName);

If (f.type = "checkbox" & f.value! == 'Off') {}

f.ReadOnly = true;

}

If (f.type = 'text' & f.valueAsString) {}

f.ReadOnly = true;

}

}

App.Alert ("the fields are now locked.", 3);

break;

zero case: / / the user pressed the Cancel button

break;

default: / / wrong password

App.Alert ("bad password.", 1);

break;

}

})();

Tags: Acrobat

Similar Questions

  • ? How do I auto add text fields because they are filled up to?

    Okay, don't know how I formulated the question of discussion. I created a pdf document where the user enters some information in the different text fields. Information of the moments more or less is needed. When there is not a lot of information, a line is fine but other times 2 or more lines may be needed. Is it possible to have the form dynamically create another line under the first, once the text entered does not match and then push the extra text and the cursor to a new line?

    Do not use the legend on the object, but an object of text separated you can put where you want... Or in the font palette align legend at top... Make sure that you select legend just highlighted.

    Paul

  • Format custom text field only when the field is filled

    I have created a form that I need to have the format of a text field "model:"& value of text field, then when it is empty so it is just empty.»

    I put event.value = "template:" + event.value; "." in the format custom properties of the text field it set to format correctly, but if it had not entered in this field he said always model: so what should I do for it to be only occur when there is something entered in the field.

    Change to:

    If (event.value) event.value = "template:"+ event.value; ".

  • With the help of javascript code to validate content in the text field only if the field is visible...

    I have a "Lock of all areas" set up button and it took to run only if some fields are filled. The code works fine... except TextField13 does not validate correctly. TextField13 is encapsulated in a subform, titled busjus. The busjus subform is hidden at the disposal of the default form (it becomes visible only when a user selects some text in a drop-down list). I want the code to check if TextField13 is null only if the busjus subform is visible.

    The problematic part of the code that does not work as expected is listed below:

    partiv.nonflow.busjus.presence == visible) && partiv.nonflow.busjus.TextField13 == null ||  

    Complete code is listed below:

    if(partiandii.parti.TextField2.rawValue == null || 
    partiandii.parti.TextField1.rawValue == null || 
    partiandii.parti.DropDownList5.rawValue == null ||
    //Part II: Current Job Details
    partiv.nonflow.busjus.presence == visible) && partiv.nonflow.busjus.TextField13 == null ||  
    partiandii.partii.NumericField2.rawValue == null ||)
    {
        app.alert('Please complete all fields marked with a red asterisk and try clicking the button again.');   
    }
    else {
        myScriptObject.LockAllFields(form1);
    }
    

    Hello

    At a glance, I believe that this piece must include the rawValue call

    partiv.nonflow.busjus.TextField13
    

    This should be

    partiv.nonflow.busjus.TextField13.rawValue

    so that you compare the text in the field instead of the actual field object.

    Hope this helps

    Malcolm

  • Create a form with AutoFill and locked text fields.

    I have created a 24 page pdf form.  I have a shape on the first page, which contains all the information scattered on next pages 24.  Most of the stuff is redundant.  I would use the pages for auto-complete.  I know that you can name the text field the same, but the problem I have is.  I would like to auto-fill text fields must be blocked at this time there.  So that the tab through forms, these fields cannot be changed accidentally.  Also has been done.  When using excel, you can have the cell/text field search another cell and get this info.  But Adobe doesn't like this.  At least is not that I can find.  How can I automatically fill these fields then the future fields through the locked document?

    Thank you

    You can not give them the same name. You can do something like this, however: that you have a field named Text1 the editable value and a field called Text1Copy where you want to have the same value, but it is locked.

    Text1Copy the value read-only under its properties - general tab, then switch to the tab calculate and enter this code:

    Event.Value = this.getField("Text1").valueAsString;

    After that, whenever the Text1 value will be changed, it will be reflected in Text1Copy.

  • Expand text fields, only when printing

    All,

    I have a dynamic form that includes several text fields for user input. These fields have a fixed height, however, allow multiple lines beyond the visible area. I don't want these fields to develop when you leave the field, but when the form is printed. The form is set up neatly on 7 pages, and I would that this still 7 when the user is working, however, I would like to expand to account for the extra text to print.

    How can I make sure when I print, expand the fields and the data flow on the next pages?

    Thank you!

    Aaron

    There may be a better way, but when I need to position elements in a past form I use rectangles set no border so that they are invisible and put where I need spaces.

  • Do I need to use javascript to get a text field in a PDF Tue Fill form with / date of the current day?

    I have a form for booking appointments, and here the date field to fill automatically with

    today's date and print it. I put in the format of the text field 'Date' and when I place the cursor in the

    today's date date field, poster. It disappears as soon as I tab to the next field.

    This action does need a javascript script to fill and print today's date? If Yes, where can I find that?

    Or y at - it another way to fit the text field (not counting as the current date by typing) to get the current date?

    Thank you.

    Ali

    using iMac 2.93 GHz Intel Core 2 Duo 8 GB | OS Snow Leopard 10.6.8 | Acrobat 8 Pro

    See example Acrobat JavaScript by Chris Dahl. The script can be an action script open document level or page to insert the date when the PDF file is open or use as a print action to fill the date just before printing the form. And the formatting of the field is 'None' because JavaScript applies the formatting.

  • Search and replace values in the text field before the values are stored in DB

    Hello
    There is a question - answer and text box text field - in my application. Problem is, some of the answers are stored with the apostrophes to the DB and I have a problem while recovering in the DB. I need to replace the single quotes 1 with 2 apostrophes. The values are stored in the DB when you click on the submit button.

    So, I'm using the following javascript code:
    italics
    < script type = "text/javascript" >
    function test().
    {
    var str = "& P2_S1.";
    document. Write (Escape (STR));
    }
    < /script >
    italics
    I need to call this javascript function, when the user clicks on the button submit, but BEFORE the values are stored in the DB. How can I get this done?

    Please let me know.

    Hi Suzi,

    Just use

    begin
    update test set S1=replace(:P2_S1, '''', '''''') where name=:APP_USER;
    end;
    

    as you did in your SELECT statement.

    But I shake also why you want to do? Where do you have problems with the apostrophe?

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins

  • Turn on the border of the text field only when the content is entered

    Hello

    Can someone tell me a method to achieve the following objectives:

    Using LiveCycle ES2, I want to set some text to have no default border fields.

    When the user enters text into a field in the finished form, I want to turn on a border for this field.

    When there is no text in this field, I want to turn off the border.

    Is this possible? If Yes, are there any suggestions?

    Thank you!

    Just put in the output of the textfield event (in formcalc):

    If ($.isNull == 0) then

    $. border.edge.presence = "visible".

    else $. border.edge.presence = "hidden".

    endif

  • Is the uiscrollbar component for use with the text fields only

    Is the uiscrollbar component for text only fields?

    Yes, this isn't in the library, you must call using code.  It is documented in the help files, even if, which should help to get you into use.

  • Cannot remove 2 empty folders in "my pictures". Said 'Read only', so they are not accessible, but if I uncheck this, there always reappears (the box is totally green) after she is unable to delete.

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    Ideas:

    • You have problems with programs
    • Error messages
    • Recent changes to your computer
    • What you have already tried to solve the problem

    Believe, otherwise, the 'Read only' attribute has nothing to do with 'read only' for folders in Windows XP.  It actually refers to a custom folder.  To change the access permissions, you must right-click on a folder, select 'Properties', then select the security"" tab.  If you do not have a Security tab, it's either because you have XP Pro and 'Simple file sharing' enabled, or you have XP Home, and you are not an administrator mode without failure.  The following items should enlighten you...

    "You can not view or change the read-only or the attributes of system files in Windows Server 2003, Windows XP, Windows Vista or Windows 7"
      <>http://support.Microsoft.com/kb/326549 >

    "How to disable the file sharing simple and how to set permissions on a shared folder in Windows XP"
      <>http://support.Microsoft.com/kb/307874 > (XP Pro only)

    The command "attrib" in a command window can be useful or, Alternatively, you can use the 'cacls' command in a command window, but it's ugly.

    HTH,
    JW

  • Synopsis of short box and text field in the detail area

    I have recently made some dynamic sites and had a question on only to shoot the first lines of couple of data in a field on the summary page and showing the full details of the page. Currently, I do 2 fields, a short field and a detail field. Can I condense these and write code to display only a few lines in my summary page?

    Thank you, David. Great answer. I searched in your book, Dreamweaver CS3 with CSS, AJAX, and PHP, but could not find.

  • How do fill you a text field based on the entries in other text fields?

    I would like to be able to have a text field that fills as 'Full' or 'Incomplete' based on the question if all required fields have been filled or not.

    For example, if the "First Name", "Last Name" and "City" text fields are not filled, the text of "the State of completion" field displays 'Incomplete' and once they are filled, the text of "the State of completion" field will turn into "Complete".

    How can I do this using javascript? I searched the web for a tutorial, but most of the results seems to be focused on the menu drop-down.

    Please point me in the right direction!

    Try the script below. I put this on the calculate for Field1 event

    If (FirstName.rawValue == null |) LastName.rawValue == null | City.rawValue == null) {}

    Field1.RawValue = "incomplete."

    }

    on the other

    Field1.RawValue = "complete."

  • The exact text of the text field to another field read-only

    Is there a way to display the string of exact text in the field of text within other text fields read-only?

    For example. I have fields of name on the first page and I have the same names mentioned in the other pages, but want to fill the other pages with the text name of the 1st page.


    Options tab > Default value doesn't seem to work, so maybe I can use calculate tab > simplified field notation.

    I have a domain called "Client_1_Name_Cover" and "Client_2_Name_Cover", so name to bind these two text fields only reading on other pages.

    You can use the validation script custom following in each of the two fields of name on the first page:

    Copy the value of this field in the field read-only

    getField("Client_1_Name_Readonly").value = event.value;

    but you must replace 'Client_1_Name_Readonly' with the actual name of the field read-only.

  • How can I add white space between areas that contain text fields? I use Adobe Acrobat Pro DC 2015.  I'm trying to change an existing PDF. I need to add white space between areas that contain text fields to allow these text fields to be developed and not

    How can I add white space between areas that contain text fields?

    I use Adobe Acrobat Pro DC 2015.

    I'm trying to change an existing PDF. I need to add white space between areas that contain text fields to allow these areas to be developed and do not overlap the text and the text below fields.

    For example:

    1. 1.

    Progress/strategies:

    1. 2.

    Progress/strategies:

    1. 3.

    Progress/strategies:

    1. 4.

    Progress/strategies:

    The space between each 'progress/strategies' increasing needs. A text field is under each of them. If it's a Word doc, I could just press on enter. What is the best way to do this with Adobe Acrobat Pro DC?

    There is no easy way to do it. You need to move the text fields more apart and if there are static elements, then you will need to use the tool edit text & Images to move them, separately.

Maybe you are looking for

  • configuration of Pro of the CMAC.

    Hi Im a student in photography in the State of New York. Well well currently I have the full enhanced version to run Adobe Photoshop, Lightroom, and Premier Pro end 2013 Macbook Pro 15 inches. Photoshop and LR is my main programs. To be honest, Macbo

  • Satellite L655 - what is the best method to reisntall ati display driver?

    What is the best method to reisntall ati display drivers as the ati Control Center no longer works.It won't work anymore. I think that something is going wrong.So how to uninstall the entire package and install again. Thanks in advance Satellite L655

  • Pavilion p6754y: BIOS specifications / features

    I am trying to determine what are the specifications and features of my BIOS. I've recently updated the BIOS most recent for my model (Version 6.11), but I need to know what are my characteristics. Specifically, I need to determine if my motherboard

  • Need to activate Windows, article 871122

    Original title: article 871122 Need to activate Windows Zero Configeration

  • TouchSmart HP Envy 15-q178ca fn key does not

    The fn on my brand new hp envy touchsmart 15-q178ca does not work, and I can't controll brightness and volume with it. No idea why?