HELP! How do I enforce a required field

All
I do hope someone can help me with this!!!
I have a pdf where I require the person before submitting to check a check box to confirm they understand a key statement. the checkbox is called Confirm.
I have seen some javascript here http://forums.adobe.com/thread/784322 which uses on blur - but the assumption is that the user has tabbed into the field concerned... what if they skip over it?
So... I decided to put some Javascript into the submit button...
the submit button currently has 3 Actions on mouse up
first it runs the following javascript
if (Confirmed.value.length == 0)
    {app.alert("The confirmation box must be checked. Please confirm.")
then it performs  file>save as>pdf
then it performs submit a form and emails the pdf
My question is - Why if you have denoted a field as required does adobe allow you to save and email a form where these fields have not been completed??? surely this is a huge bug??
ok... but the logic I put in with the first javascript does not get triggered, can anyone explain why not? .... more importantly... can anyone help me with some code which achieves this desired effect -
when the form is submitted, I need to check if the checkbox has been checked and if not display the above alert AND exit out of the rest of the submit actions.
thanks
george

A: HELP! How do I enforce a required field

It is not at all a huge bug. Some thoughts:
1. Your script isn't working because it's not correct. If you want to check the state of a check box and do something based its state, the code could be something like:
// Get the value of the check box with the field name "Confirmed"
var v = getField("Confirmed").value;
// The field value with either be the string "Off" (if not selected) or the export value (if selected)
if (v !== "Off") {
    // Proceed with the submit here
    submitForm({cURL: "[email protected]", cSubmitAs: "PDF"});
} else {
    // Check box not selected. so alert the user
    app.alert("You must select the \'Confirmed\' check box before you can submit this form.", 3);
2. Even if a check box is set as required, it won't prevent the submit form action or JavaScript from submitting. This is because the field always has a value. This is different for a radio button group. If none in a radio button group that is makred as required is selected, then the submit won't be allowed to take place until one is. This is just how it works, so you have to use a script instead as shown above.
3. Can you explain why you want to save the form before it is submitted? It is automatically done when the entire PDF is submitted, so there normally wouldn't be a need to do this.
4. Use just a single JavaScript action. If you use multimple actions, the are independent from one another, so one can't prevent a subsequent one from being triggered.

It is not at all a huge bug. Some thoughts:
1. Your script isn't working because it's not correct. If you want to check the state of a check box and do something based its state, the code could be something like:
// Get the value of the check box with the field name "Confirmed"
var v = getField("Confirmed").value;
// The field value with either be the string "Off" (if not selected) or the export value (if selected)
if (v !== "Off") {
    // Proceed with the submit here
    submitForm({cURL: "[email protected]", cSubmitAs: "PDF"});
} else {
    // Check box not selected. so alert the user
    app.alert("You must select the \'Confirmed\' check box before you can submit this form.", 3);
2. Even if a check box is set as required, it won't prevent the submit form action or JavaScript from submitting. This is because the field always has a value. This is different for a radio button group. If none in a radio button group that is makred as required is selected, then the submit won't be allowed to take place until one is. This is just how it works, so you have to use a script instead as shown above.
3. Can you explain why you want to save the form before it is submitted? It is automatically done when the entire PDF is submitted, so there normally wouldn't be a need to do this.
4. Use just a single JavaScript action. If you use multimple actions, the are independent from one another, so one can't prevent a subsequent one from being triggered.

Similar Messages

  • How to make text box required field if checkbox is checked??

    I have a web form that I need to look something like this:
    (Checkbox) Check here if it is for an individual  ID: (textbox) Required field if checkbox is checked and a numeric value
    (Checkbox) Check here if it is for an organization ID: (textbox) Required field if checkbox is checked and a numeric value
    (Checkbox) Check here if is neither (textbox is hidden and not required if "neither" is checked)
    Currently the form looks like this: http://ncsu.edu/advancement-services/resources/researchrequest.html.  The above information is going to go where it says prospect name and id number on the form.  I would like to have the three checkboxes in a menu instead if that is possible.
    How do I make the form do this?  I created the form in the above link but I don't can't figure this one out.
    Thanks so much in advance!!
    Erika Roe

    Sharmila,
    My form is based on Master/Detail Table....I have chosen defalt layout ...Not a Custom form.
    In this case,could you suggest me what I should do ?..The customer is very much insisting on that..
    Thanks in Anticipation
    Babu

  • How to show asterisk for required fields in a table row?

    Hi Folks,
    For showing the asterisk (*) for required fields in a form, I used to give required="true" for the component and surround the component with a af:panelLabelAndMessage for which I set showRequired="true". How to do this for a component in a table row. For a component in a table, there is no label per se. The required=true flag in the component shows proper error message saying that it is required but there is no (*) for that component.
    Thanks
    Vishal

    Table does not have any required attribute.But column has showRequired property .You can used this.If column has input text then also you put required true on this component.And set your required messages there .
    It will resolve your problem
    Thanks
    Prateek

  • How can I make a Required Field give a text window if not completed?

    My question is simple but I cannot find any way to do this. I need to set a field on a form I created to do 1 of 2 things:
    1. Not allow you to save the Document until the required text box has information added to it
    and or
    2. Have a window's style prompt or text box appear and say "THIS FIELD NEEDS TO BE COMPLETED BEFOR CONTINUING"
    I have been told this isn’t hard to do but I have poured many man hours into this personally and have come to the conclusion I am possibly border line retarded or just do not comprehend how to complete this task. If this needs to be done in Java Script I would need a very good walk through or at least pointed to an idiot proof tutorial that I can read and complete this task.
    Any and all help would be appreciated.
    Thank You,
    PTM

    thanks for the help again,
    its still not working, I have the following:
    insert is set to yes
    update is set to NO
    update if null only is set to NO
    Lock record is set to NO.
    I tried setting insert to No, but when the user reaches the form its says "field is protected against update."
    what I want ?
    when the user reaches the form, the user has to perform a Ctrl - L to populate the list of values.
    After the user selects from the list of values, I want the field to be un-editable in the text field.
    thanks,

  • Help Enforcing "Required" Field

    Thanks in advance for your help. I am trying to enforce a required field, so the user can go no further until they enter something in that particular field. The problem is that our forms are not intended to be submitted, rather to be filled out and sent by e-mail. fax. or snail mail. Any suggestions?

    This is not a good idea. Yo can lock a user into a form field that they do not know how to complete and cannot get out of the form.
    You need to write JavaScript to verify that the required fields are completed before you unlock or mark the field as complete.
    You also should consider highlighting the problem fields.
    You can use the "Required" property and use the "value" and "defaultValue" properties of the field to see if default value for the field has been changed.

  • How to hide the select-options fields on radiobutton select in webdynpro

    hi
    Could you please help how to hide the select-option fields in webdynpro
    there are four radio buttons
    for every radiobutton there is corresponding the select_option filed is associated to it
    user as only provision select  one radio button and reset of the select-option fileds should be hidden
    which ever the radio button is selected corresponding the select-options fileld should be displayed
    please find the attachement below

    Hi Nine,
    To hide select options you should use interface method REMOVE_SELECTION_SCREEN_ITEM of IF_WD_SELECT_OPTIONS.
    Sample code :
    Write the below code in the Event handler of Radio Button.
    DATA lv_r_helper_class TYPE REF TO if_wd_select_options.
    lv_r_helper_class = lo_interfacecontroller->init_selection_screen(
    lv_r_helper_Class->REMOVE_SELECTION_SCREEN_ITEM(exporting i_id = 'Select_option1_id1').
    This will hide first select option of your screen.Similarly pass select_option_id2 to hide it and so on.
    Regards,
    Ravikiran.k

  • Moving item Required field error message

    How do you move the required field error message?
    for example when a field is left blank and the page submits
    a error message would populate right under the label and push the item(text box) to the right. Making the form look very ugly.
    http://i.imgur.com/fCBZJ.png
    *i want to move the error message box to the right or below the textbox or somewhere that doesn't push the item...
    Edited by: PandaOracle on Jan 16, 2012 10:35 AM

    That only moves the DML error messages
    I kind of want to move the default error messages for the items. ( i dont see any message tab or anything in the edit page for items.)
    Edited by: PandaOracle on Jan 18, 2012 7:31 AM

  • Reading the required fields from a pdf document

    Hi all,
    My requirement is, How can i get the required field values from a scanned document which is in pdf format. Can anyone provide the idea how to approach this using Java.
    thank u all .

    function(){return A.apply(null,[this].concat($A(arguments)))}
    Scribby182 wrote:
    -How can I remove this function altogether?  There is no significance to the image filenames and I'd rather not have to ensure they all match the document text.
    I'm not aware of anyway to automatically remove them from the pdf file. You can manually remove each of them but it's always better to treat the source file than to treat the PDF file for changes.
    To keep from seeing them without having to remove them all in Word, just use the "print method" to create the PDF file. Print to the Adobe PDF printer rather than using the Save as Adobe PDF feature.
    Regards,
    Joe

  • How can i make recon account field editable

    Hi,
    Can you help how to make the recon account field of a customer editable?
    Thank you.
    Rachelle

    Hi Rachel,
    Use T.code OB20.double click on create customer,double clcik on company code data,double click on account management,make the reconciliation account as optional entry and save.
    Make ur changes and if u want to restore the changes,follow the same procedure again.
    Thanks
    Aravind

  • How to configure a required field in the Vendor Account Creation?

    Hello,
    Good day to all!
    Please kindly help me change the set up for Transaction FK01: Create Vendor. I need to set the field for Withholding Tax Number as a 'Required' field during creation of vendor account for local vendors only. How can I be able to do that? Please advise.
    Thank you so much in advance..
    April

    This should have been posted in the SCM forum. Anyway, here is the path in config(tcode SPRO).
    Implementation Guide for R/3 Customizing (IMG)
    -->Financial Accounting
       -->Accounts Receivable and Accounts Payable
          -->Vendor Accounts
             -->Master Records
                -->Preparations for Creating Vendor Master Records
                   -->Define Account Groups with Screen Layout (Vendors)
    Once you choose this option, you will be presented with a screen where you have to choose an account group and click the display icon. In the next screen, under the 'Edit Status' section, double click on 'Company Code Data' and then in the next screen double click on 'W/holding tax data, w/h tax 2'. Here you can change the attributes to make it required.
    Srinivas

  • Enforce required fields

    Hi, I am working on a editable PDF form that includes several required fields. I tried several ways to enforce the users to fill them before saving it:
    1. Mark them as "required" , but it doesn't do anything. My understanding is those required fields will only be checked when the form is submitted. Since the form does not have any "submit" button, it won't be checked
    2. Use "Custom validatioin script" to validate the field.
    3. Use a javascript on "On-blur" event.
    It seems both 2 and 3 can check if the field is blank or not when the mouse leaves the require field. But when the user skip this required field, say, the user don't click the field at all, the scripts used in 2 or 3 are not triggerd. Thus the user can save the document still with blank fields.
    How should I prevent it from happenening? And advice would be highly appreciated/
    Thanks,
    beautumn

    First, the 'submit' with regard to the 'requite' field property, is a submit to a web server scripting page, not a 'submit' button.
    So do you want your users to only to be able to save the form if they complete the form?
    Then lock them into a loop to the uncompleted field until they complete the field. Not a very user friendly approach.
    There is a 'will save' action that can also check for the completion of required fields. You will need to decide what action you want taken, but you can not stop the save action.
    You could:
    Erase the data.
    Mark the form as incomplete.
    Have an alert window pop-up.
    You can not also stop one from printing an incomplete form through the 'Will Print' action.
    You may need to write a document level script to check all of the required fields and take some action as needed. This could be used by a number actions like will save, will print, email form, submit to a web server.

  • How to block the 'save' function when the required fields are not filled?

    Hello, Everyone
    I am new for this scripting. My question is:
    How to block the 'save' function when the required fields are not filled?
    I designed a PDF file with some required fields and I do not want the user to save the document until all required fields are filled. My idea is to write some scripts in Willsave method like:
    if (this.getField("Family Name").value == ""){
    app.alert('You should fill the Family Name field firstly!');
    But I do not think it works as finally the document is saved after all.
    Please help me on that!
    So much thanks.

    Dear Randybearwang,
    I am a Rocky myself and I know how though it is to establish some good codes. Since I created some forms with validation options myself I might have a code for you. The code also creates an alert box (Yes/no option) if the user chooses yes the form will be validatet, if he chooses "no" the alert window will be closed.If  everything is filled out correctly the form will be saved otherwise the textbox will be higlighted and gets focus.
    If you need further assistance , please let me know
    Have fun with the code.
    P.s I don´t know how to upload the "PDF" document. I wrote you an email, please get back to me if you still need the file.

  • Need help making digital signature field read only if required fields are null

    Using Adobe LiveCycle Designer, I have a digital signature field.  I want to prevent users from being able to digitally sign the pdf if any required fields in the pdf are null or blank.  I'm a newbie to scripting so any detailed help would be greatly appreciated.  The required fields in the pdf include radio buttons, check boxes, text field, etc.  I appreciate any help anyone can provide.
    Thanks

    Exactly how you check a field for being empty depends on what type of field it is. For text fields, you should get the field's value as a string and compare it to an empty string, something like:
    var val = getField("Text1").valueAsString;
    if (val) {
        app.alert("Field is not empty");
    If there is a default value that needs to be changed, you would compare to the default value:
    var f = getField("Text1");
    var val = f.valueAsString;
    if (val !== f.defaultValue) {
        app.alert("Field value is OK");
    For check boxes and radio buttons, you'd compare to the string "Off", which means none in the group is selected.
    For dropdowns (combo boxes) and list boxes, there is normally one value selected, so you would have to get the value and check against the default value (or something else) to see if the field is properly filled in.
    You could place the script there, but I usually use a separate button that I encourage the user to click in order to check the field. The problem with using the Will Save event is you can't prevent the save from happening.
    The script can loop through all of the fields (and test all required ones), or you could set up an array of field names to check.

  • How do I use 'submit' as complete pdf, and use 'drawn my signature' with required fields?

    I have created a form with required fields, no problem. The form can be completed with adobe reader, and a signature added using Sign > Place signature > Draw my signature, great. But i need the required fields to be checked and then sent by email, so I have add a button and set the action to "Submit a form" and selected "PDF The Complete Document" from the options. I then add the javascript URL - mailto:????@????.com, but now the "Draw my signature" option is greyed out.
    I have asked this question a number of times, and cannot get a proper answer, please can someone help or offer a work around.

    George,
    Thanks for your response, but I am not sure it fully answers my question. I have attached a screenshot to show what I mean - here I have created a simple form, with one required field for some data, using Acrobat XI. If I open the form (I have not reader enabled the form) in Adobe Reader XI, I am able to add a drawn signature, I could save the document then attach to an email to send as you have suggested.
    But, If I now add a Submit button, set the URL to mail it to [email protected] and select "PDF the complete document" as below
    When I open the document in Adobe Reader now, the signature options are all greyed out as you can see.
    Hope this clarifies my predicament

  • How to display custom error message if the Required field is not entered?

    Hi,
    I have made one input field as required field in a view.
    I want to display one custom error message ,if the required input field is not entered.
    Please help me regarding this.
    Thanks,
    Deepika

    hi deepika....
    First go to message pool under webdynpro components.
    Create a new message there..of type error.
    Enter your text.
    Now to avoid null pointer exception , in wdDoInit(), initialise the value
    wdContext.currentDateTimeElement().setDate("");
    now create an action for submission of data. If field is empty, then within the button write:
      msg = wdComponentAPI.getComponent().getMessageManager();
        if(wdContext.currentDateTimeElement().getDate().equals(""))
        msg.raiseMessage(IMessageCompTodatDateTime.ERROR,new Object[]{""},true)     ;
    between begin others put:
    regards,
    pinki
      IWDMessageManager msg = null;

Maybe you are looking for

  • Credit card information auto populate on "Payments cards screen"

    Hi Everybody, I have requirement where in for some specific order types i need to auto populate Dummy credit card details in sales order "Payment cards" screen.i was searching lot of exists and i found that Xfplt is the structure i need to update,But

  • 10.2 not working on WinXP SP3 Firefox or IE8

    Hi there, We have about 250 Windows PC's (Mix of HP DC7800/7900/8000elites), running Windows XP SP3 and IE8 and Firefox 3.6.13. Since this latest update users have complained they cannot see any youtube content, the screen is black. I have tried unti

  • Arithmatic overflow

    Hi, I have a form draft that is getting an arithmatic overflow error when it opens.  The error explanation is due to the formula below.  Is there a way to fix this?   HIRE.measurementpage.#subform[0].dutyfinalscore::calculate - (FormCalc, client) $ =

  • Resetting Column Sortability

    Hi All, The problem is basically when User clicks the Sortable column and choose its descending order and then clicks the CREATE operation. The new row in ADF TABLE gets created as last row at the Last navigation. So i need to show the new row on fir

  • Can you bold a word in a text message?

    I have the 5C. Want to know if you can bold a word in a text message?