Highlight required fields via script...

Does anyone know how to highlight all of the required fields via script?
Acrobat displays a checkbox for highlighting required fields, but it
is unchecked by default and the user has to click it each time they open
the document. I have yet to see a way to set it as a preference in
Acrobat or Reader and I don't see any way to enable this via an
initialize script either.
Any ideas?

[email protected] wrote:
> Justin,
>
> This line should work...
> app.runtimeHighlight = true;
>
> I try using it in the initialize event for the page but the results are inconsistent. I am having other issues so we left this one alone for the moment. If you get it to work consistently please let me know.
>
> - Yolanda
Yolanda,
This highlights ALL fields. I want to highlight only the required
fields.
Justin

Similar Messages

  • Highlight required fields/Clear fillColor upon data entry

    So here's what I'm trying to do in LifeCycle Designer 7. I have a dynamic form that I highlight the required fields by setting their fillColor to a blue upon form initialization. I then want the fields to go to transparent after data has been entered into them. But then if they delete that data, I want the color to return so they know they still need to put data in that field.
    I've gotten some help from these forums, but I just can't seem to get it to where it needs to be. I can go between blue and white (w/ a visible border that I don't want), but I cannot get the fields to go completely transparent. If there was a way to automatically check the "Highlight Fields" and/or "Highlight Required Fields" boxes upon opening the pdf, I wouldn't have to do this at all.
    So here is my code for the exit event of the fields:
    if (this.rawValue == null || this.rawValue == "")
    this.ui.oneOfChild.border.presence = "hidden";
    this.fillColor = "153,255,255";
    else
    this.ui.oneOfChild.border.presence = "visible";
    this.fillColor = "255,255,255";
    If I take out the fill in the else statement, it always stays blue.
    Any help would be greatly appreciated.
    Thanks.

    Hi,
    I have the same problem, cannot get the fill color back to transparent.
    Could you find a solution?
    Regards,
    Chris

  • Highlighting required fields when printing?

    Is there a way to make it so that required fields are highlighted when the PDF is printed?

    Hi,
    Script migth be something like this. Put it on Change event of the check box
    if (this.rawValue == 1) { Subform1.fieldname.fillColor="255,255,0"
    xfa.layout.relayout();
    else 
    { Subform1.fieldname.fillColor="255,0,0"
    xfa.layout.relayout();
    BR,
    Paul Butenko

  • Need help in LiveCycle Forms - Highlighting required fields when the check box is checked / Un-highlighting the fields if I un-check the check box...

    Hello All!
    I am relatively new to creating forms within LiveCycle but I have learned quickly so bare with me on my question.
    I have figured out how to highlight a field when a check box is clicked on, however, I cannot get it to remove the highlight when the check box is unchecked?
    This is what I used for the highlight:
    Subform1.fieldname.fillColor="255,255,0"
    Can anyone provide any insight or suggestions on how I might fix this script issue?
    Thanks in advance!
    -Lisa

    Hi,
    Script migth be something like this. Put it on Change event of the check box
    if (this.rawValue == 1) { Subform1.fieldname.fillColor="255,255,0"
    xfa.layout.relayout();
    else 
    { Subform1.fieldname.fillColor="255,0,0"
    xfa.layout.relayout();
    BR,
    Paul Butenko

  • At least one required field was empty on export. Please fill in the required fields (highlighted)

    "At least one required field was empty on export. Please fill in the required fields (highlighted)"
    I'm tearing my hair out with this one. Have checked all the fields to confirm if I had set the Type as User Entered - Required. Can't find any such field. Any help would be appreciated. Is there an email id where I can send the form?

    Hi,
    In your script when you make an object visible, you also make it mandatory. No problem there!
    However the script that hides the object goes through this sequence:
    hide the object, THEN
    make it optional/not mandatory.
    This is where the problem lies.
    You FIRST need to make the object optional/not mandatory AND THEN hide the object. It should just be a simple case of work through the various scripts and having the mandatory line before the presence line.
    There is an example here: http://assure.ly/hxHupW.
    Hope that helps,
    Niall

  • A pop-up message is frozen on my settings page. I was trying to set up an apple id for iTunes when I got a message "required fields have been left blank. The missing information is highlighted in red." the ok button doesn't work. 1st gen iPad.

    A pop-up message is frozen on my settings page. I was trying to set up an apple id for iTunes when I got a message "required fields have been left blank. The missing information is highlighted in red." the ok button doesn't work. The message is now fixed & I cannot get rid of it. Ironically, when I found this forum I was able to set up an apple Id. Please advise how to get rid of the pop-up box. Thanks!

    I'm having this same problem as well and cannot advance--very irritating. All of the information is filled out correctly and I've editted my AppleID information online separately as well to get around this issue, but no luck...

  • Adobe forms-checking that required fields are completed-Java Script

    I have inserted two Java Scripts into my form--one for checking for required fields are completed, and then one for generating an email pulling a custom subject line, as shown below:
    var emptyFields = [];
    for (var i=0; i<this.numFields; i++) {
         var f= this.getField(this.getNthFieldName(i));
         if (f.type!="button" && f.required && f.display==display.visible) {
              if ((f.type=="text" && f.value=="") || (f.type=="checkbox" && f.value=="Off")) emptyFields.push(f.name);
    if (emptyFields.length>0) {
         app.alert("Error! You must fill in the following fields:\n" + emptyFields.join("\n"));
    this.mailDoc({bUI:false,cTo:"[email protected],[email protected],[email protected]",cSubject:"Bugzilla Form for: "+this.getField("Bugzilla Title").value+" - "+this.getField("Bugzilla ID").value})
    Issue: After the error window displays fields that have not been completed, when I click OK the email window displays.
    QUESTION: How can I stop the email window from displaying until all fields are completed?
    THANKS!

    Thank you so much for your quick response (and thank you for all the code that I am reusing!) I have another issue now.Can you see why the following is occurring....
    I placed else in and now it edits the required fields, but once they are completed, will not initiate the email prompt. Here's what I have now
    var emptyFields = [];
    for (var i=0; i<this.numFields; i++) {
         var f= this.getField(this.getNthFieldName(i));
         if (f.type!="button" && f.required && f.display==display.visible) {
              if ((f.type=="text" && f.value=="") || (f.type=="checkbox" && f.value=="Off")) emptyFields.push(f.name);
    if (emptyFields.length>0) {
         app.alert("Error! You must fill in the following fields:\n" + emptyFields.join("\n"));
    elsethis.mailDoc({bUI:false,cTo:"[email protected],[email protected],[email protected]",cSubject:"Bugzilla Form for: "+this.getField("Bugzilla Title").value+" - "+this.getField("Bugzilla ID").value})

  • Check for required fields before locking subforms and submitting

    Hello,
    I have a 5-page form with many questions, to be completed by the original requestor and multiple approvers.  What I'm trying to do is have the original requestor's Submit button on p. 3 lock the input on the first three pages, but first check if all those fields have some content.  I currently have all the fields on pp. 1-3 set to "Required" in the object properties, but my script still locks them when there's is one empty one.  Here's what I have:
    //Lock portions of form
    Page1.access = "readOnly"
    Page2.access = "readOnly"
    Page3.access = "readOnly"
    //Save document, allow user to change name
    app.execMenuItem("SaveAs");
    //Submit via e-mail
    Submit_REAL.event__click.submit.target = "mailto:[email protected]" +
    "?subject=Subject text" +
    "&body=Message";
    Submit_REAL.execEvent("click");
    The automatic check for required fields happens after the pages get locked.  I would like the check to stop the process before it locks the pages.  Is there any way to check all at once that all "Required" fields on those pages have some content before allowing the script to proceed?  I know how to script it to manually check the 50 or so questions on those pages, but I would like to avoid that.  Thanks for any help.

    There are a few problems that I can see from the start. First, your code is going to pick up EVERY node that exists on these pages. Some of those nodes will not have a rawValue, and some will not have an actual name. As an example, you can take your code and create a text field to dump all of the names of the nodes that you get when you pull in all of the nodes this way. Here's an example:
    The result:
    Now, the question is, do you have a consistent naming convention for your fields that might be empty? That could be text fields, radio button lists, etc. For instance, I always prefix the names of objects in order to more easily keep track of what they are in scripts. Since I'm doing that, I can check the name of the field for tf, nf, rbl, cb, or whatever I have included to make sure that I'm checking an actual field before I check for things like rawValue.
    var nodeName = oNodes.item(nNodeCount).name;
    if (nodeName.indexOf("tf")>-1 || nodeName.indexOf("rbl") > -1 || /*check other field types*/) {
      //insert your code to check for empty answers here
    As for your line 7 issue. The syntax problem is that you've put extra parentheses in your if statement. Take out the parentheses that are just before and after the or "||".
    *This is my fourth attempt to reply. Something was going on with Adobe/Jive earlier, I suppose.

  • Pop up Window before saving remembering the need (forcing) to fill required fields in a form

    Hi!
    I searched the "old" forum and have very good help from UVSAR but unfortunately I'm not able to access my message sent to that forum anymore.
    [I could never thank all the people who answered because I keep receiving "Your submission has triggered the spam filter and will not be accepted.""]
    I've have never use Java scripts in my life: I started about three days ago.
    1) I'm using Adobe Acrobat Pro X (Windows 7)
    2) I've created a form using Microsoft Word and save it as a pdf file.
    3) After I created a form using Acrobat Pro X;
    3.1.) This form it's not going to be submitted over Internet. It will be send by e-mail to some persons. They will receive it, fill in the form and send it back to me via e-mail. Note: I will save it with extended rights in order to allow to be read with acrobat reader (I'm the only one of the group having Professional edition).
    4) In that form I've created some text fields (for now it's just what I need - no radio buttons, dropdown
    menus, and so...)
    5) Choosed Properties and marked 7 fields as "required";
    6) Used a script I found in here: http://forums.adobe.com/thread/784322 (thank you for the authors of the thread)
    if (!event.target.valueAsString) {
    app.alert("My text My text", 3);
    7) This script allows me to remember people to fill that 7 specific fields (when using mouse or tab).
    8) So... What I really need? Here are the reasons for my request for help:
    8.1.) When people use the Acrobat Reader Save button (not a button I created inside the form) it will pop up an alert message. Users will receive a pop up window telling them they need to fill those fields before saving the form and send it back to me. Can someone share a script, please? Thanks in advance.
    8.2.) Is there a way to colorize the fileds that need to be filled? Again I only learned where to insert a java script yestaerday sou I'm not able to write one. I'm sorry for my newbie questions.
    8.3.) Last question: In one of the fields there will be an e-mail address. On the end of the form I want to create a button like "Send by e-mail" and When someone press that button the e-mail will be sent to the address that was written in the earlier specific field. How can I do this (link a button to an e-mail address in a specific field)? Can someone help me with a script or ideas? Hope I was clear.
    8.1.) UVSAR sent me the following code that works fine untill I save the document for the first time. Affter that he never shows me pop up window again.
    var isFilled = true;
    for (var i=0;i < this.numFields;i++){
    var f = this.getNthFieldName(i);
    if (this.getField(f).required && !this.getField(f).valueAsString) isFilled = false;
    if (!isFilled) app.alert("You must complete all the required fields");
    8.3.) With the help of UVSAR I used:
    var mailto = this.getField('emaddr').valueAsString;
    if (mailto!='') this.mailForm({ bUI:true, cTo:mailto, cSubject:"This is the subject", cMsg: "This is the body of
    the mail." });
    else app.alert("Cannot submit form until the email address field is completed");
    but gives me an error (Note: I named the filed with e-mail "emaddr")
    Once again Thank you so very very much to all the kind people who take their time to share knowledge...
    I'm not a native speaker, sorry for some errors
    Best regards
    AC

    Hi Winnie
    Unfortunately I have been sick and did not read the message before. I apologize.
    I have not received help beyond what is on the page. But when I get I tell you.
    I hope you can get answers. If you receive, I ask that you share with me.
    thank you very much
    best regards
    AC
    Date: Mon, 27 Feb 2012 09:33:10 -0700
    From: [email protected]
    To: [email protected]
    Subject: Pop up Window before saving remembering the need (forcing) to fill required fields in a form
        Re: Pop up Window before saving remembering the need (forcing) to fill required fields in a form
        created by Win_Form in Forms - View the full discussion
    Hi ACI wonder if you can share any responses on to your question above?I too have never used a script but, I have the same problems as you in regards to building a form. And wants to have the same 'protection' and message reminders for the end users. Any information, including a script and/or a contact email of experts you can share with me will help tremendously. Thank you so much in advance. Winnie
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4232307#4232307
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4232307#4232307. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Forms by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Fillable Forms with Required Fields

    So I know how to create a fillable form, but is there a way to force a user to fill out all of the fields on the form before they can save the form?  Any help is much appreciated.

    Thank you for the suggestions.  Clicking the required checkbox only highlights the field in red, it doesn't actually notify the user that the field is in fact required.  I don't think I'll be able to go the java script route.  I've done some research through Pro's help site and there doesn't seem to be any way to do this at this point in time.
    They should add this in the future!

  • Unable to save a form with missing required fields

    I have a form, with required fields, as part of the new hire process. I would like to make sure the user fills in the required fields before closing/saving the form.
    I have a custom script that highlights the missing required fields when the complete/validate button is clicked.
    This, however, doesn't stop the user from saving the form. As a result, we are getting incomplete forms returned.
    Is there a way to stop the user from saving the form until the required fields are filled ?
    Thanks in advance.
    Aditya

    I have a "validate" button that sets a flag (for workflow). This button will perform the check and highlight the missing fields.
    Once the user completes the form, he/she saves and emails the form. The reason for not having the email button is because not all users will have outlook and wouldn't want to go through the wizard.
    I understand your point but I need to know if there is some solid way of not allowing the users to return the form without completing the form.
    If I include an email button, the users can still save, by using the toolbar menu, and email the incomplete document.
    As we are planning to implement Digital Signatures, would it be possible to have the check in the presign event. Will this prevent the document fron being signed until the required fields are filled ?
    Thanks
    Aditya

  • Checking Required Fields

    Because I wanted specific subject line when the form is submitted via email, I used the following script attached to the click event of a regular button:
    var vCompany = Company.rawValue;
    var vDevice = txtDeviceName.rawValue;
    event.target.submitForm({cURL:"mailto:[email protected]?subject="+vCompany +" "+vDevice+" CDQ submittal &body=Submitting the attached Customer Design Questionnaire.",cSubmitAs:"PDF",cCharset:"utf-8"});
    This works correctly, but the user can submit the form without all the required fields filled out. What script do I add to the regular button to check the required fields? I know the Submit e-mail button does this automatically, but as far as I know, the subject line cannot be dynamic when using this library button.
    Thanks,
    Mark

    There are many ways...
    The simplest is setting your required fields to "mandatory" and using execValidate() from your submit/print/etc. button.
    if ([fieldName|subformName|formName].execValidate())
              do stuff;
    else
              don't do stuff;
    To get deeper into it, there are some exellent posts and script objects on the FormFeed blog:
    http://blogs.adobe.com/formfeed/2008/11/validation_patterns_part_1.html
    http://blogs.adobe.com/formfeed/2008/11/validation_patterns_part_2.html
    http://blogs.adobe.com/formfeed/2008/11/validation_patterns_part_3.html
    If you do go down this road, the latest version of the supplied scripts are in the following post:
    http://blogs.adobe.com/formfeed/2009/03/a_form_to_design_a_form.html

  • .aspx forms, required fields left blank

    Hi. I am working with someone on an .aspx page. They created the page & all I do is test it. We put this page live for a week & someone filled out the form, but somehow managed to skip a couple required fields. I do not know how they did this, because we have a pop-up window that will come up if you did not enter a field in, it will let you know. 3 fields were not filled in that are required. Is there a special blank character they could have put in? I tried the space bar but that did not work. Any ideas as to why or how they got around this?
    Thanks.

    A link to your form page would help, but sounds like JavaScript is being used for the form validation, and the user may have had JavaScript disabled? Otherwise, the required fields are possibly being set via hidden fields in the form, in which case a spammer could by-pass the form and submit directly to your script, getting around the fields being required. Both are just possible guesses though.

  • Power view in SharePoint - Required fields not working!!!

    Hi,
    We have SharePoint 2013 and SQL Server 2014 and SSRS in SharePoint integrated mode.
    We have a "Microsoft BI Semantic Model for Power View"-data connection in a document library and by clicking it users can create their own Power View reports.
    We have in the document library defined a couple of columns as required.
    When a user saves their Power View report(File->Save as) to the document library, the required fields are left blank. They are not checked!!!
    WHY?
    Does Power View use REST when saving to the document library?
    This question should be in SQL Server/Power View/SharePoint -forumns, but MSDN forces you to select only one.
    How can we enforce the checking of required columns???

    It might be the result of nested script tags.
    <script type="text/javascript">
    <!--
    <!--
    Remote one of those opening tags and remove the closing tag in between the scripts.
    Also, I'm not sure if you are aware, but your site looks completely broken in Firefox. Edges are ragged and the text runs off the page in places. This is the result of using a graphics program to create your html. Image ready slices are fine for prototyping, but not suitable for production work because they create code that is fragile and too rigid.
    I also would not use the Flash header you have used just to display imges. I suggest using a more accessible method.

  • Change the Data Type of a Standard Required Field

    Hello Experts,
    Need to know if is it possible to change the data type of a standard field. The field is marked as a required field.
    For example: If a standard field is an Object Picker and I would like to change it to a string field. Is it possible? How can I do it?!
    Many thanks,
    Igor Nakamura

    Hi Igor,
    Since you cannot hide a required field, what you can do is move the standard required field to someplace less noticable (like the bottom of the page) and then use a validation script to set it to some benign value.
    -Howie

Maybe you are looking for

  • I can't drag and drop my songs from mp3 rocket to my iphone?

    i have my mp3 rocket account linked to my itunes account and some songs get put onto my phone, but some dont. i can't drag and drop and if i try to rename it with correct characters, nothing happens. the mp3 rocket folder is in music under shared lib

  • How do I create an AppleDouble "dot-underscore" file from the command line?

    We're going through a process of migrating NetWare shares to Windows shares (without File Services for Macintosh) where I work. One concern is that the NetWare shares are shared as AFP volumes to the Macs. All the finder info and metadata for the fil

  • Flashplayer10 msi will not install using gpo

    I created a GPO in AD and assigned it to the computer level not the user linked it to the domain and the scope securtiy filter is domain computers. on a test box I boot in to windows and I can see flash run the msi istall but when I log on the comput

  • Message creation problem in stwb

    Dear All During testing users are creating messages from test workbench status->message tab. Message is also getting created can be seen in service desk. But the problem is the message which is getting created is not added to the message tab of the t

  • JES 2005Q4 Administration Server Console Problem

    Hello, I have installed JES on Sol 10x86. I've used /usr/sbin/mpsadmserver configure to configure the Admin Server Console. I used the default user;admin I used a password that I know, I used the default port of 390. when I type /usr/sbin/mpsconsole