Clear Specific Forms Fields

How can I clear specific forms fields without resetting/clearing entire PDF document, using a button - Can anyone help with the code?
I am using Adobe Acrobat 6.0 Professional
Thanks

In Acrobat forms you can use the following JavaScript for teh "Mouse Up" action:
var aClearFields = new Array(); // define array for field names
aClearFields[0] = "FieldName1"; // first field name
aClearFields[1] = "FieldName2"; // second field name
// and so on for all the field names
this.resetForm(aClearFields);
// or
// pass an array of strng names
this.resetForm(["FieldName1", "FieldName2"]);

Similar Messages

  • How to clear the form fields which are not rendered

    I have a creation form. There is a document_type list set up as a partial triger. When user change the document type, only the filed related to that document type will be rendered. This caused a problem when we need to clear the form . The input in the field which is not render won't be cleared when reset button is pressed. Can anybody give a sugestion on how to handle this?
    I tried to use the following function to clear the fields. It does not work since it get the list value before the list value change and clear the fields after the new field rendered.
    public void clear_action(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    System.out.println("test1");
    String coutcase = null;
    if(EL.get("#{bindings.Proxy.inputValue}") != null){
    coutcase = EL.get("#{bindings.Proxy.inputValue}").toString();
    System.out.println(coutcase);
    AttributeBinding a11= (AttributeBinding)getBindings().getControlBinding("INT_FNAM");
    AttributeBinding a12 = (AttributeBinding)getBindings().getControlBinding("INT_LNAM");
    AttributeBinding a13 = (AttributeBinding)getBindings().getControlBinding("TIT_PROG");
    AttributeBinding a14 = (AttributeBinding)getBindings().getControlBinding("T_OF_INT");
    AttributeBinding a15 = (AttributeBinding)getBindings().getControlBinding("NETWORK");
    AttributeBinding a16 = (AttributeBinding)getBindings().getControlBinding("IN_DATE");
    AttributeBinding a17 = (AttributeBinding)getBindings().getControlBinding("PE_FNAM");
    AttributeBinding a18 = (AttributeBinding)getBindings().getControlBinding("PE_IN_LNAM");
    AttributeBinding a19 = (AttributeBinding)getBindings().getControlBinding("WEBSITE");
    AttributeBinding a20 = (AttributeBinding)getBindings().getControlBinding("URL");
    AttributeBinding a21 = (AttributeBinding)getBindings().getControlBinding("INT_DATA");
    AttributeBinding a22 = (AttributeBinding)getBindings().getControlBinding("D_ACCESS");
    AttributeBinding a23 = (AttributeBinding)getBindings().getControlBinding("CASE_NUM");
    AttributeBinding a24 = (AttributeBinding)getBindings().getControlBinding("COURT");
    AttributeBinding a25 = (AttributeBinding)getBindings().getControlBinding("PLAIN");
    AttributeBinding a26 = (AttributeBinding)getBindings().getControlBinding("DEFEN");
    if(coutcase.equals("Interview")) {
    a11.setInputValue(null);
    a12.setInputValue(null);
    a13.setInputValue(null);
    a14.setInputValue(null);
    a15.setInputValue(null);
    a16.setInputValue(null);
    a17.setInputValue(null);
    a18.setInputValue(null);
    /*a19.setInputValue(null);
    a20.setInputValue(null);
    a21.setInputValue(null);
    a22.setInputValue(null);
    a23.setInputValue(null);
    a24.setInputValue(null);
    a25.setInputValue(null);
    a26.setInputValue(null);*/
    } else if(coutcase.equals("Internet")){
    /*a11.setInputValue(null);
    a12.setInputValue(null);
    a13.setInputValue(null);
    a14.setInputValue(null);
    a15.setInputValue(null);
    a16.setInputValue(null);
    a17.setInputValue(null);
    a18.setInputValue(null);*/
    a19.setInputValue(null);
    a20.setInputValue(null);
    a21.setInputValue(null);
    a22.setInputValue(null);
    /*a23.setInputValue(null);
    a24.setInputValue(null);
    a25.setInputValue(null);
    a26.setInputValue(null);*/
    } else{
    /*a11.setInputValue(null);
    a12.setInputValue(null);
    a13.setInputValue(null);
    a14.setInputValue(null);
    a15.setInputValue(null);
    a16.setInputValue(null);
    a17.setInputValue(null);
    a18.setInputValue(null);
    a19.setInputValue(null);
    a20.setInputValue(null);
    a21.setInputValue(null);
    a22.setInputValue(null);*/
    a23.setInputValue(null);
    a24.setInputValue(null);
    a25.setInputValue(null);
    a26.setInputValue(null);
    }else{
    System.out.println("coutcase is null");
    }

    Hi,
    The easiest way to modify the screens in the Std transactions using ITS is to modify the ITS templates corresponding to that transaction.
    E.g In you case,there will be a ITS service corresponding to the ESS transaction.This ITS service will have  number of HTML templates which will actually correspond to the diffrent screens in the Trascn.What you need to do is find out the HTML template in the ITS service which corresponds to the screen(which you want to modify) in the STd transacn.To do this ,the easiest way is to right click on that Web page and say VIEW SOURCE.It will show you a HTML code with the ITS service name and the template which is being used for that particular screen.
    So after you find out the correct HTML template to be modified,you can simply hide the fields by putting the HTML code lines in between the symbols
      <!   and  -->
    BR,
    Disha.
    <b>Pls reward points for useful answers.</b>

  • Acrobat XI programmatically reset/clear all form fields when opening a PDF form

    I've got a PDF form document that I'm working on.  I'd like to add something to it to programmatically clear or reset all form fields to blank when the document is opened.
    Thoughts/ideas??
    Mucho thanks!!

    You can use the resetForm JavaScript method, either in the initial page's Page Open event or in a document-level JavaScript whic will execute when the document is opened.
    http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.523.html

  • Round trip clearing adobe form field values not binded to webdynpro context

    Hi ,
    I have developed a webdynpro ABAP application with Interactive form. I'm calling a webservice on 'exit event' of the one of the form fields. Once webservice is executed, Im filling a table with 300 rows which is in the form. The table fileds are binded to webservice fields from the dataview of the form , these are not webdynpro context attributes in the data view.
    But when I open any seach help , this table values are disappearing. I need to execute the webservice again to get the values.
    can any one tell why the values in the table are disappearing? since I have binded to the webservice fields the values should remain there.
    Apprecaite your response.
    Regards,
    Ravi

    I looked over that note yesterday, but too quickly - i thought it was an older note explaining which standard programs to run to test out the connection etc...
    but i see now that there is an important point:
    The "pdfSource" attribute of the InteractiveForm UI element should be linked only if the Web Dynpro ABAP application requires the PDF document for further processing (saving data to the database, and so on). However, it is mostly only the data entered in the interactive form that is relevant for the application. If this attribute is linked, the Web Dynpro ABAP framework must request an updated PDF document from the Adobe document services each time data is changed in the form.
    It looks like this is saying that a round trip is possible in WDA.
    EDIT - I wish SAP would fix this certificate issue. My first post every day is doubled because of it.
    Edited by: robert phelan on Jan 7, 2010 3:22 PM
    Edited by: robert phelan on Jan 7, 2010 3:25 PM

  • Should moveToInsertRow() clear my form fields?

    I have followed the AppModel and the InsertUpdateDelete examples and in these examples after the method "moveToInsertRow" it appears that the form in being cleared so the user can enter new information, this is not happening in my case, what do I need to do so that I can clear the form for an insert? I was assuming the moveToInsertRow() method would do this for me??
    Thanks,
    Ritchie

    Valerie
    I tried this but still to no avail. Can you look at this code and tell me if you see anything wrong with it.
    hrm_phoneRowSet1 is a rowset for all records in the Row set and hrm_phoneRowSet is to show 1 particular record on the screen.
    // If this is the first time in the Application then Current Row = 0
    if (getSessionBean1().getCurrRow() == 0) {
    if (hrm_phoneRowSet1.next()) {
    // Keeps track of the last row we were on before rebuilding screen
    // and is essential for Navigation in the Full Rowset
    getSessionBean1().setCurrRow(hrm_phoneRowSet1.getRow());
    // Keeps track of the last Phone record that was on the screen
    // before rebuilding the screen. Used as a starting point
    // for the 1 record Record Set.
    getSessionBean1().setSeqId(hrm_phoneRowSet1.getBigDecimal("SEQ_ID"));
    hrm_phoneRowSet.setObject(1, getSessionBean1().getSeqId());
    // Execute the query which contains only the one record with
    // the current Sequence Id
    hrm_phoneRowSet.execute();
    hrm_phoneRowSet.next();
    lastNme.setValue(hrm_phoneRowSet.getString("LAST_NME"));
    firstNme.setValue(hrm_phoneRowSet.getString("FIRST_NME"));
    title1.setValue(hrm_phoneRowSet.getString("TITLE_DSC"));
    emailId.setValue(hrm_phoneRowSet.getString("EMAIL_ID"));
    emplId.setValue(hrm_phoneRowSet.getString("EMPL_ID"));
    sectionDsc.setValue(hrm_phoneRowSet.getString("SECTION_DSC"));
    locationDsc.setValue(hrm_phoneRowSet.getString("LOCATION_DSC"));
    busUnitCde.setValue(hrm_phoneRowSet.getBigDecimal("BUSUNIT_CDE"));
    civicNbr.setValue(hrm_phoneRowSet.getString("CIVIC_NBR"));
    strCode.setValue(hrm_phoneRowSet.getBigDecimal("STR_CODE"));
    floor.setValue(hrm_phoneRowSet.getString("FLOOR"));
    workPhn.setValue(hrm_phoneRowSet.getString("WORK_PHN"));
    faxPhn.setValue(hrm_phoneRowSet.getString("FAX_PHN"));
    pagerPhn.setValue(hrm_phoneRowSet.getString("PAGER_PHN"));
    cellPhn.setValue(hrm_phoneRowSet.getString("CELL_PHN"));
    else {
    warn("Cannot navigate to the first record");
    log("PhoneBook: Problem navigating to the first record in Page 1 initialization");
    Thanks,
    Ritchie

  • Acrobat XI hangs when adding a response from distributed form, when specific form field is filled

    As the question says, when using the distribute form functionality of Acrobat, it hangs at the step of importing or adding a filled form, when a specific field on the form is filled.  It happens whether the tracker automatically detects it when I open the distributed form and asks me to add it, or I manually try to add it in the responses form. Here's the screenshot of when I tried manually adding it.  The first line is the one that hangs and is missing all fields except that "Approved" check box.  But it's the last field "ApprovedDate" that makes it hangs if it's filled in the form.  The Progress dialog just stays there forever and I can't click cancel.  When it tries to add it automatically, nothing appears on the screen, the form just stays open and the tracker doesn't come up.  I'm on Windows 7, Acrobat XI Pro.  I can send you the form if needed.
    Edit: I investigated further and there were Java scripts associated with that date field.  These would have been added while creating the form in Acrobat; I don't remember how exactly, but I only meant to validate the date format.  I've removed all the scripts and reset the desired date format on the field and it seems to work now.

    I use Mavericks and Acrobat XI. I haven't had any issues so far.

  • Adobe Reader X Crashes after filling a specific form field

    I've recently upgraded to Adobe Reader X on some of our systems.  Now I have a user unable to fill out a form without reader crashing.  I've duplicated the issue on my PC, and confirmed that the form is functional with Reader 9.4.1 running on another system.
    The pdf we're having issues with is here:
    http://www.ime.state.ia.us/docs/CrossOverProfessional.pdf
    Usersa re able to fill out everything up to the field #21, titled "Billed Amount".  When a dollar amount is entered in this field, adobe reader crashes.  If I skip this field, reader also crashes when a dollar amount is entered in field #22, Allowed amount.  All other fields on the page can be filled out without issue.
    This document does seem to do some data verification as you leave a field, checking to confirm the data entered is the right number of digits, alpha or numeric, dates in the correct format, etc.  I suspect whatever type of checks it's trying to do on these two dollar amount fields must be causing the error. 
    Is this a bug in how Reader X handles forms created in previous versions of acrobat?  Short of asking for the form to be updated, is there anything I can do to make this work with Reader X, or do I need to roll back to version 9 for now?
    Thanks!

    Thanks.  I've posted there as well.  Anyone know if there's a workaround to keep reader from crashing with this form, or is my only option to roll back the servers until the creator of the form updates it?
    (I have notified their webmaster of the issue, but who knows how long it will take the state to update the form.)

  • How can I clear Form Field?

    Hi Friends,
    I have created a new custom login named ZSYSTEM. It is a copy of the standard BSP Login Application SYSTEM. The ZSYSTEM uses the subclass  ZCL_BSP_LOGIN_APPLICATION of CL_BSP_LOGIN_APPLICATION.
    In the method IF_BSP_APPLICATION_EVENTS~ON_REQUEST I have wrote a new
    business logic for the login. The issues are the istructions:
      request->set_form_field( name = 'sap-user' value = '' ).
      request->set_form_field( name = 'sap-alias' value = '' ).
    They don't run. The fields 'sap-user' and  'sap-alias' aren't cleaned. I need clear the form field in case of user not authorised.
    I use the same custom Login BSP ZSYSTEM on NTW 7.3 and all run good.
    I read the notes 1513787 and 1421668.
    The SP level of SAP_BASIS  where issues happen is SAPKB70018.
    Do I need to install the SP SAPKB70022?
    Is there another possibility to clear the value of an form field?
    My code is as follow:
      DATA: lv_sapuser TYPE string,
            lv_sapalias TYPE string,
            lv_username_ret TYPE string.
      CLEAR: lv_username_ret, lv_sapuser, lv_sapalias.
      lv_sapuser = request->get_form_field( 'sap-user' ).
      lv_sapalias = request->get_form_field( 'sap-alias' ).
      TRANSLATE lv_sapuser TO UPPER CASE.
      TRANSLATE lv_sapalias TO UPPER CASE.
      IF NOT lv_sapuser IS INITIAL OR NOT lv_sapalias IS INITIAL.
        IF NOT lv_sapuser IS INITIAL.
          lv_username_ret = lv_sapuser.
          CALL FUNCTION 'Z_CHECK_LOGIN_ZGR1_CALL'
            DESTINATION 'APPREZZI'
            CHANGING
              iv_username = lv_username_ret.
        ENDIF.
        IF lv_username_ret IS INITIAL AND NOT lv_sapalias IS INITIAL.
          lv_username_ret = lv_sapalias.
          CALL FUNCTION 'Z_CHECK_LOGIN_ZGR1_CALL'
            DESTINATION 'APPREZZI'
            CHANGING
              iv_username = lv_username_ret.
        ENDIF.
      ENDIF.
      IF ( NOT lv_sapuser IS INITIAL OR NOT lv_sapalias IS INITIAL ) AND lv_username_ret IS INITIAL.
        request->set_form_field( name = 'sap-user' value = ' ' ).
        request->set_form_field( name = 'sap-alias' value = ' ' ).
      ENDIF.
        CALL METHOD super->if_bsp_application_events~on_request
          EXPORTING
            runtime    = runtime
            request    = request
            response   = response
            navigation = navigation.
    Regards,
    Antonio

    Hi,
    I guess you need to clear the attribute bsp_user
    and value
    as per code,
    sap-user is having value property set as value="<%= application->bsp_user%>".
    Here bsp_user is the attribute from claSS CL_BSP_LOGIN_APPLICATION.
    Please check same for sap-alias and clear the values accordingly.
    Thanks,
    Chandra
    Edited by: Chandrashekhar Mahajan on Oct 6, 2011 2:09 PM

  • Flatten Form field Only or specific field

    I’m doing a PDF Form for a client. The client will use Adobe Reader XI to enter the data and save the results.
    I was using a button with a javascript to flatten the form field and do a save as. Everything work fine until I discovered that the flatten Javascript ALSO remove all the manually created links in the PDF.
    Like I have said, this will be done in Reader, so their is no way this people will use Prefligh, PDF Optimized features to achieve that.
    Someone told me it was impossible to (a) flatten specific form field by name, or (b) flatten ONLY the form field and keep links active using Javascript.
    Is this true? Does a workaround exist?
    Thanks!

    It is possible to selectively flatten annotations (including form fields), but it's not as easy as specifying a field name. For more information see the flattenPages documentation: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.466.html
    As you can see, you can control which annotations are flattened by controlling whether they are set to print or not. This is the basis of the following: http://www.uvsar.com/projects/acrobat/flattener/

  • Clear Form Fields

    Hi,
    I have downlaoded the above from teh adobe site, but not sure what folder to place in.  If any help the dowload gives the path below to use.
    Commands > Dreamlettes > Clear Initial Form Fields.

    I'm not familiar with the Extension to which you refer, but my guess is that it needs to write code to the <head> of your document.  If you're using DW Templates to generate pages, your Template's <head> tag needs to be editable. 
    <head>
    <!-- TemplateBeginEditable name="head" -->
    <!-- TemplateEndEditable -->
    </head>
    Nancy O.

  • Link a Form Field to new Text Field

    PDF - form field
    Looking for a code to link a form field(text_1, on page #5) to
    another, new form field(text_2, on pages 2-4).
    Maybe a "Page Properties" action (i.e., Page Open: field text_2 = field text_1)
    ~~
    Why....
    busy but here's why
    In the PDF, there are Form fields on page 5 which interface (externalinterface) with an RMA ( a SWF) on page 2.
    This all works well.
    As the form fields must be carried forward (from page 5 to page 2... to interface the RMA),
    the orignal page 5, From fields are copied to pages 2-4 and then "Hidden".
    Again, this works just fine.
    A reset "action" (button) was added to, well, clear the Form Field for easy reuse.
    The reset ''action' does it's job and clears ALL form fields with the same "Name".... on every /all pages.
    This causes the dynamic interface, with the RMA, to display blank fields (within the SWF).
    This will effect the User's experience.
    ~~
    Work aound.....
    Find a way to label the Form Fields (page 5) so that "only they" are reset, and no others.
    Create a link of Form Field inputs on page 5 (with names... x,y,z),
    to new Form Fields pages 2-4 (with a differnet names... a,b,c).
    Thanks in advance for your help....
    DS

    Hi jm,
    This may be what you are after. No text wrap, but notes are there.
    Type an account number into the Enquire table to get Client and Contact
    Formula in B2 (and Fill Right)
    =INDEX(Database::B,MATCH($A2,Database::$A,0))
    Large notes display table with Wrap Text
    Formula is
    =INDEX(Database::D,MATCH(Enquire::$A2,Database::A,0))
    All together:
    Change it around if you want to look up by Client instead of Account
    Regards,
    Ian.

  • Resetting Dyna form fields

    Hi,
    I am developing a Web Application using Struts. I have a JSP form which is a Dyna Form, the scope of this form is "session". The form has few input text fields. When i Submit the form, the associated action creates the record in database. Then the action is forwarded to the same jsp page.
    In the action I used dynaform.reset(mapping, request) method after submitting but still the form displays the values.
    Do I have to explicity clear each form field in the action class. Or is there any better way of resetting the fields of this form.
    Any suggestions are highly appreciated.
    Thanks in advance.

    I faced similar problems, my solution was to use a specialised DynaACtionForm
    public class DynaActionResetForm extends DynaActionForm
      public void doReset( ActionMapping actionMapping, HttpServletRequest httpServletRequest )
        initialize(actionMapping);
    }Call doReset when you otherwise would call reset()

  • Can you create a button that adds specific text to a form field?

    Hi,
    I was wondering if it was possible to create a button in a PDF that, when clicked, adds specific text to a form field?
    I am trying to make a product catalogue where you click on a product button to add the product name or code to a form field.
    Each product in the catalogue will have a button and the more you click the more is added to the form field(s).
    Then when you have finished adding products to the form field(s) I want to be able to save and email the entire PDF as an order form.
    Any thoughts would be appreciated!
    Cheers,
    Jim

    Yes, it's possible. The most simple version of such a script will be something like this (used as the button's MouseUp event):
    var v = this.getField("Products");
    if (f.value!="")
         f.value += ", ";
    f.value += "Product1";

  • How do I clear a form text field during validation using JavaScript?

    I am just learning JavaScript and the Acrobat API.  I have a form created in adobe acrobat 9 standard (starting from an existing form in MS Excel).  There is a text field for a Social Security Number.  I have a custom format script and keystroke script and a custom validation script. I would like to add to the existing validation script, that if what is entered doesn't match the validation test, then clear out the field as in erase all the characters that were typed into the field.  I want this to happen no matter what.  So even if someone filled in a valid SSN number and then moved to the next field, but then went back to the SSN field and decided to change their entry and this new entry was "invalid" then clear out the field (do not revert to what was typed in the field originally, even though it was considered valid by the script).  (There is currently no default value for this field.)  Thank you inadvance for you help on this.
    Here is the current validation script:
    // only run when field not blank
    if (event.value != "")
    // RegExp for validation #########
    var re = /^(\d{3})(\d{2})(\d{4})$/
    if(re.test(event.value) == false)
    app.alert("Enter a 9-digit Social Security number with no spaces or special characters (e.g., 555555555). It will be converted to the format 555-55-5555.")
         //Here is where I've tried adding all of these lines, but none of them will clear out what is in the field
              //this.resetForm([event.target.name]);
              //event.target.value == "";
              //getField("SSN 1").value = getField("SSN 1").defaultValue;
              //getField("SSN 1").value == "";
              //event.rc = false;
    And incase these are somehow affecting it, here are the other scripts being processed on this field:
    Keystroke script:
    var input=event.value;
    var chars=input.length;
    if( event.willCommit || chars==8 )this.getField("Name 1").setFocus();
    Format script:
    var re = /^(\d{3})(\d{2})(\d{4})$/
    if(re.test(event.value) == true)
    // add "-"
    event.value = RegExp.$1 + "-" + RegExp.$2 + "-" + RegExp.$3;

    Thank you very much.  I did try that before, but I was using event.value == "";  I guess in this case I'm assigning the value of "", not making the value equal "".

  • Exporting one specific pdf form field data to a specific webpage field

    Hello there.
    I am currently creating a form in which I need to export one specific pdf form field data to a specific webpage field to avoid typing it again or hitting ctrl+c and then ctrl+v to the webpage, as there are several records that need to be copied and pasted.
    I read that there is no access to the clipboard within pdf therefore, would like to know if there is any way to do that without accessing the clipboard.
    I am a newbie and have been learning by searching the forums and Google, therefore, would appreciate any insight on whether or not this is possible using javascript or the "submit form" funcion.
    Any help is greatly appreciated!

    Hi George, thanks for your response!
    The main issue I have is that this web page is in fact a government page in which I have to manually copy and paste information.
    I have no idea how to automate this process - I have access to the scripts on the page to see what I am able to do, but since I do not have much experience (only very basic javascripting), any other insight would be great!

Maybe you are looking for