Setting a form field as mandatory

Hi,
            I want to set a field as mandatory field in one of my transaction document under the tab folder.

Hi Raghav,
In Item Event Pval.BeforeAction True in item pressed write this code
If pVal.FormMode = 2 And pVal.ItemUID = "1" Then
                        If MandatoryFields(FormUID, BubbleEvent) = False Then
                            BubbleEvent = False
                            Exit Sub
                        End If
end if
Private Function MandatoryFields(ByRef FormUID As String, ByRef bubbleevent As Boolean) As Boolean
        objForm = objMain.objUtilities.GetForm(FormUID)
        If objForm.Items.Item("ItemUID").Specific.String = Nothing  or  "" Then
            objMain.objApplication.SetStatusBarMessage("------ is Missing", SAPbouiCOM.BoMessageTime.bmt_Short, True)
            Return False
end if
end function
Rgds
Micheal

Similar Messages

  • How to set a form field focus

    Is there a simple way to set a form field focus... so basically on load the field focus is set to a specific field?  I know how to write it in javascript but was wondering if there is a simple way to basically select the field and click a button or two and get the same result?  thanks.

    The script for that is extremely small and very simple.
    In all hosety, it would probably take longer to edit it through the DW interface than by hand.
    Add this after your form and change the bold areas to the name of the form and the name of the input you want to have focus on...
    <script type="text/javascript" language="JavaScript">
    document.forms['myform'].elements['mytextfield'].focus();
    </script>
    Those two things are the only items that will ever change.

  • How do I set a form field to accept whole numbers only?

    I am using Acrobat X.
    I have a number of fields in a form that are used in a variety of calculations. It is the nature of these fields that they need to contain whole numbers only, no decimals.
    On the "Format" tab, I have set the field format to "Number" and the number of decimal places to "0"
    On the "Validate" Tab I have set the "Field Value is in Range" "From 0", "To 999"
    This is to ensure that the field can only contain a maximum of a three digit number.
    But this still allows the user to enter decimal places. This messes up my calculations so I want to limit the user's input to whole numbers.
    How do I do that?
    Thanks!
    Steve

    I apologize for being dense but I really do not know how to apply your solution. Taking the path you suggested there is nothing under Tools>Document Processing relating to Java scripts.
    I presume that I have to save this part somewhere in Acrobat:
    // Document-level function
    function triDigKS() {
        // Get all that is currently in the field
        var val = AFMergeChange(event);
        // Reject entry if anythig but digits
        event.rc = AFExactMatch(/\d{0,3}/, val);
    And then use the call out:
    // Custom Keystroke script
    triDigKS();
    Somewhere else but I don't know where thos two places are. Do I use the callout in the validation tab, or somewhere else?
    Thanks
    Steve

  • How to set a form field that automatically saves as email subject title

    I am creating a form in acrobat 9 and want the submit to email button to automatically use the information from one of the text fields as the subject title of the email. So when the client submits the form at the end the PO number they have used will automatically be the email subject. Is there any way to do this? I have found an example created using javascript but I am very much a novice with this so I don't know where to start with this? Any help would be greatly appreciated

    Read this tutorial:
    http://acrobatusers.com/tutorials/dynamically-setting-submit-e-mail-address

  • How to set a form field in pro so an 'adobe reader' user can insert a jpg (not a pdf) as an image. It used to work but now doesn't.

    I think this question has been asked a million times before but I'm hoping something has been resolved now! It did work for me and my client a few months ago (by using the 'event.target.buttonImportIcon();' script. I'm 99% certain it worked fine a few months ago, where the adobe reader user could select a jpg to insert...but now it only allows a pdf. Does anyone know if anything can be done? I know you may say LiveCycle but is there really nothing else?
    Thanks in advance.

    There's nothing to solve. If Reader (XI only) is used only PDF files can be selected. This is how it's supposed to work (although I agree it's silly and should be changed).

  • I/O error opening a pdf file with form fields, using itextsharp

    Hi,
    I'm using itextsharp PDFStamper to set the form fields in a pdf file. It works on my computer properly, but on the QA site and other developer's machine it only shows the values of the form fields, the original text does not show, and it gives the error message "An error exists on this page. Acrobat may not display the page correctly". Please does any one know what's causing this error and how to fix it?.
    Thanks,
    Uyi

    I recommend you try tech support for the iTextSharp product (I believe
    there is a mailing list). This forum is for questions about
    understanding the PDF Specifications. You could try an Acrobat forum,
    but I think the first option has a better chance of success.
    Aandi Inston

  • Can I retain PDF created form fields if importing back to indesign?

    Hello,
    First time forum user here.
    I have been trying to create an active form that would work as an internal approval form for any design job created in Indesign. I saw in other posts here that it is not possible to create this in Indesign so I designed my form in Indesign, created PDF & set up form fields within that Arobat file.
    I now want to imprt this back into Indesign whilst maintaining the field functionality with the intention of it becoming a Library item.
    Is this possible & what is the direction I would take to achieve this? I am not familiar with XML (which is what I tried but didn't understand what I had created).
    Hope you can help,
    Mel

    Thanks Peter,
    It was a bit of a long shot - I was trying to cheat the system somewhat but yes, your response is exactly what I have been coming up with.
    What a great function this could be though for Design Studios everywhere and more - Design Checklists/Client Approvals/Printers Notes that can be modified to auto-fill as per set fields. Can sit it in the slug and it would be a great reference point for any stage of the job (well that's my studio/production manager head talking - nice neat documentation... LOVE IT!
    Guess I will have to rely on Acrobat to get me through.
    Appreciate your time.
    Mel

  • CL_HTTP_CLIENT, HTTP POST of XML as a form field, encoding

    I am working on a couple of interfaces between a SAPsystem (NetWeaver 2004s, ABAP stack) and another system.
    On the SAP side we are using the built-in HTTP-client (CL_HTTP_CLIENT).
    For the interface from SAP to the other system, the other system expects an XML as the value of a form field in an HTTP POST request.
    In fact, it was described as doing the equivalent to this HTML-fragment in a web-browser:
    <form action="http://over.there.com/interface/import.php" method="post">
      <p>Please enter your xml data:
        <textarea name="data" cols="50" rows="10"></textarea>
        <input type="submit" value="submit">
      </p>
    </form>
    I assume I will have to do a SET_METHOD in order to get the POST method (as opposed to GET) and a SET_FORM_FIELD (for field "data").
    According to the reference I found at W3C ( http://www.w3.org/TR/html4/interact/forms.html ), the default encoding method for a POST is "application/x-www-form-urlencoded". Does this mean I have to do this encoding myself?
    Could I opt for another encoding - "text/xml" for example? If so, how? With a SET_HEADER_FIELD?

    Thank you.
    This is how we set the context-type:
        call method client->request->if_http_entity~set_content_type
            exporting
              content_type = p_contyp.
    where p_contyp contained 'text/xml'.
    This is how we set the form-field data:
    call method client->request->if_http_entity~set_form_field
            exporting
              name  = p_formfd
              value = xmlstring.
    where p_formfd contained 'data' - the name that was specified.
    This is how we make the request a POST:
    call method client->request->set_method
          exporting
            method = 'POST'.

  • Required form fields - help.

    Hello:
    Knowing next to nothing about html code, Javascript and submission forms, I was hoping to make the following form fields below mandatory.
    Below is the script for doing so and below that the form. Can someone please adjust the form below (to work with the Javscript) so that it will function, so that I can just copy the adjusted code, paste it all into the form page and be on my way? Any help would be appreciated.
    Thanks,
    --Joe
    First Name
    Last Name
    Title
    Facility/Practice Name
    Daytime Phone
    Evening Phone
    Email
    <script language="JavaScript">
    <!--
    * Required field(s) validation v1.10- By NavSurf
    * Visit Nav Surf at http://navsurf.com
    * Visit http://www.dynamicdrive.com/ for full source code
    function formCheck(formobj){
        // Enter name of mandatory fields
        var fieldRequired = Array("FirstName", "LastName");
        // Enter field description to appear in the dialog box
        var fieldDescription = Array("First Name", "Last Name");
        // dialog message
        var alertMsg = "Please complete the following fields:\n";
        var l_Msg = alertMsg.length;
        for (var i = 0; i < fieldRequired.length; i++){
            var obj = formobj.elements[fieldRequired[i]];
            if (obj){
                switch(obj.type){
                case "select-one":
                    if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
                        alertMsg += " - " + fieldDescription[i] + "\n";
                    break;
                case "select-multiple":
                    if (obj.selectedIndex == -1){
                        alertMsg += " - " + fieldDescription[i] + "\n";
                    break;
                case "text":
                case "textarea":
                    if (obj.value == "" || obj.value == null){
                        alertMsg += " - " + fieldDescription[i] + "\n";
                    break;
                default:
                if (obj.type == undefined){
                    var blnchecked = false;
                    for (var j = 0; j < obj.length; j++){
                        if (obj[j].checked){
                            blnchecked = true;
                    if (!blnchecked){
                        alertMsg += " - " + fieldDescription[i] + "\n";
        if (alertMsg.length == l_Msg){
            return true;
        }else{
            alert(alertMsg);
            return false;
    // -->
    </script>
    <form id="wstForm_Contact" name="Contact Form" action="%wstx.formmailerurl%" method="post" labelid="formLabel_ContactForm">
        <table width="100%" cellspacing="1" cellpadding="5" class="contactFormTable">
            <tbody>
                <tr>
                    <td align="center" style="font-size: 8pt; text-decoration: none; font-weight: normal;">
                    <table width="90%" cellspacing="0" cellpadding="3" border="0" class="contactFormTable">
                        <tbody>
                            <tr>
                                <td align="center" style="font-size: 12pt; font-weight: bold;">
                                <font face="Palatino Linotype, Book Antiqua, Palatino, serif"><span id="formLabel_ContactForm" controlid="wstForm_Contact">Contact Us</span><br />
                                </font>
                                </td>
                            </tr>
                            <tr>
                                <td style="font-size: 8pt; text-decoration: none; font-weight: normal; padding-bottom: 10px;">
                                <p style="text-align: justify;">
                                <font face="Palatino Linotype, Book Antiqua, Palatino, serif" style="font-size: 13px;">In this area, you can enter text about your contact form. You may want to explain what happens after a visitor submits the form and include a contact phone number.</font>
                                </p>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <table width="90%" cellspacing="1" cellpadding="3" border="0" class="contactFormTable">
                        <tbody>
                            <tr>
                                <td style="font-size: 8pt; text-align: left;">
                                <span id="formLabel_First" controlid="formElement_First">First Name:</span>
                                </td>
                                <td style="font-size: 8pt; text-align: left;">
                                <input id="formElement_First" name="First Name" labelid="formLabel_First" />
                                </td>
                            </tr>
                            <tr>
                                <td style="font-size: 8pt; text-align: left;">
                                <span id="formLabel_Last" controlid="formElement_Last">Last Name:</span>
                                </td>
                                <td style="font-size: 8pt; text-align: left;">
                                <input id="formElement_Last" name="Last Name" labelid="formLabel_Last" />
                                </td>
                            </tr>
                            <tr>
                                <td style="font-size: 8pt; text-align: left;">
                                <span id="formLabel_Last" controlid="formElement_Last">Title:</span>
                                </td>
                                <td style="font-size: 8pt; text-align: left;">
                                <input id="formElement_Last" name="Title" labelid="formLabel_Last" />
                                </td>
                            </tr>
                            <tr>
                                <td style="font-size: 8pt; text-align: left;">
                                <span id="formLabel_Last" controlid="formElement_Last">Facility/Practice Name:</span>
                                </td>
                                <td style="font-size: 8pt; text-align: left;">
                                <input id="formElement_Last" name="Facility/Practice Name" labelid="formLabel_Last" />
                                </td>
                            </tr>
                            <tr>
                                <td style="font-size: 8pt; text-align: left;">
                                <span id="formLabel_Street1" controlid="formElement_Street1">Address Street 1:</span>
                                </td>
                                <td style="font-size: 8pt; text-align: left;">
                                <input id="formElement_Street1" size="30" name="Address Street 1" labelid="formLabel_Street1" />
                                </td>
                            </tr>
                            <tr>
                                <td style="font-size: 8pt; text-align: left;">
                                <span id="formLabel_Street2" controlid="formElement_Street2">Address Street 2:</span>
                                </td>
                                <td style="font-size: 8pt; text-align: left;">
                                <input id="formElement_Street2" size="30" name="Address Street 2" labelid="formLabel_Street2" />
                                </td>
                            </tr>
                            <tr>
                                <td style="font-size: 8pt; text-align: left;">
                                <span id="formLabel_City" controlid="formElement_City">City:</span>
                                </td>
                                <td style="font-size: 8pt; text-align: left;">
                                <input id="formElement_City" name="City" labelid="formLabel_City" />
                                </td>
                            </tr>
                            <tr>
                                <td style="font-size: 8pt; text-align: left;">
                                <span id="formLabel_Zip" controlid="formElement_Zip">Zip Code:</span>
                                </td>
                                <td style="font-size: 8pt; text-align: left;">
                                <input id="formElement_Zip" size="5" name="Zip Code" maxlength="5" labelid="formLabel_Zip" /> (5 digits)
                                </td>
                            </tr>
                            <tr>
                                <td style="font-size: 8pt; text-align: left;">
                                <span id="formLabel_State" controlid="formElement_State">State:</span>
                                </td>
                                <td style="font-size: 8pt; text-align: left;">
                                <select id="formElement_State" name="State" labelid="formLabel_State">
                                <option value="AL">
                                AL
                                </option>
                                <option value="AK">
                                AK
                                </option>
                                <option value="AZ">
                                AZ
                                </option>
                                <option value="AR">
                                AR
                                </option>
                                <option value="CA">
                                CA
                                </option>
                                <option value="CO">
                                CO
                                </option>
                                <option value="CT">
                                CT
                                </option>
                                <option value="DE">
                                DE
                                </option>
                                <option value="DC">
                                DC
                                </option>
                                <option value="FL">
                                FL
                                </option>
                                <option value="GA">
                                GA
                                </option>
                                <option value="HI">
                                HI
                                </option>
                                <option value="ID">
                                ID
                                </option>
                                <option value="IL">
                                IL
                                </option>
                                <option value="IN">
                                IN
                                </option>
                                <option value="IA">
                                IA
                                </option>
                                <option value="KS">
                                KS
                                </option>
                                <option value="KY">
                                KY
                                </option>
                                <option value="LA">
                                LA
                                </option>
                                <option value="ME">
                                ME
                                </option>
                                <option value="MD">
                                MD
                                </option>
                                <option value="MA">
                                MA
                                </option>
                                <option value="MI">
                                MI
                                </option>
                                <option value="MN">
                                MN
                                </option>
                                <option value="MS">
                                MS
                                </option>
                                <option value="MO">
                                MO
                                </option>
                                <option value="MT">
                                MT
                                </option>
                                <option value="NE">
                                NE
                                </option>
                                <option value="NV">
                                NV
                                </option>
                                <option value="NH">
                                NH
                                </option>
                                <option value="NJ">
                                NJ
                                </option>
                                <option value="NM">
                                NM
                                </option>
                                <option value="NY">
                                NY
                                </option>
                                <option value="NC">
                                NC
                                </option>
                                <option value="ND">
                                ND
                                </option>
                                <option value="OH">
                                OH
                                </option>
                                <option value="OK">
                                OK
                                </option>
                                <option value="OR">
                                OR
                                </option>
                                <option value="PA">
                                PA
                                </option>
                                <option value="RI">
                                RI
                                </option>
                                <option value="SC">
                                SC
                                </option>
                                <option value="SD">
                                SD
                                </option>
                                <option value="TN">
                                TN
                                </option>
                                <option value="TX">
                                TX
                                </option>
                                <option value="UT">
                                UT
                                </option>
                                <option value="VT">
                                VT
                                </option>
                                <option value="VA">
                                VA
                                </option>
                                <option value="WA">
                                WA
                                </option>
                                <option value="WV">
                                WV
                                </option>
                                <option value="WI">
                                WI
                                </option>
                                <option value="WY">
                                WY
                                </option>
                                </select>
                                </td>
                            </tr>
                            <tr>
                                <td style="font-size: 8pt; text-align: left;">
                                <span id="formLabel_DaytimePhone" controlid="formElement_DaytimePhone">Daytime Phone:</span>
                                </td>
                                <td style="font-size: 8pt; text-align: left;">
                                <input id="formElement_DaytimePhone" name="Daytime Phone" labelid="formLabel_DaytimePhone" />
                                </td>
                            </tr>
                            <tr>
                                <td style="font-size: 8pt; text-align: left;">
                                <span id="formLabel_EveningPhone" controlid="formElement_EveningPhone">Evening Phone:</span>
                                </td>
                                <td style="font-size: 8pt; text-align: left;">
                                <input id="formElement_EveningPhone" name="Evening Phone" labelid="formLabel_EveningPhone" />
                                </td>
                            </tr>
                            <tr>
                                <td style="font-size: 8pt; text-align: left;">
                                <span id="formLabel_Email" controlid="formElement_Email">Email:</span>
                                </td>
                                <td style="font-size: 8pt; text-align: left;">
                                <input id="formElement_Email" name="Email" labelid="formLabel_Email" />
                                </td>
                            </tr>
                            <tr>
                                <td style="font-size: 8pt; text-align: left;">
                                <span id="formLabel_Comments" controlid="formElement_Comments">Comments:</span>
                                </td>
                                <td style="font-size: 8pt; text-align: left;">
                                <textarea id="formElement_Comments" name="Comments" rows="4" cols="38" style="width: 100%;" labelid="formLabel_Comments">Enter comments here!
                                </textarea>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <p>
                    <input type="submit" id="wstForm_Contact_Submit" value="Submit" onclick="return wstxSubmitForm(this);" /> <input type="reset" id="wstForm_Contact_Reset" value="Reset" />
                    </p>
                    </td>
                </tr>
            </tbody>
        </table>
        <input type="hidden" id="FormMailerSubject" name="FormMailerSubject" value="Contact Form." /><input type="hidden" id="FormMailerRedirect" name="FormMailerRedirect" value="%wstx.project.BaseUrl%" />
    </form>

    Rather than re-inventing the wheel, why don't you use Spry Validation widgets for your client side processing? Have a look here http://labs.adobe.com/technologies/spry/demos/formsvalidation/index.html and here http://labs.adobe.com/technologies/spry/samples/.
    Mind you, using JS your are only validating on the side of the client. If JS is turned off in the browser, there will be no validation. Therefore you should look at serverside validation as well.
    Gramps

  • Adding saved form fields when page count changes

    It appears that there isn't a way inside of EchoSign to apply a set of forms fields that has been saved to the templates if the new version of the form has a page added or deleted.
    It seems like it would either require the form fields to be edited outside of EchoSign or be recreated from scratch if the form adds or removes a page when it is updated.
    I would appreciate any insight or confirmation.

    The situation would be thus:
    The document for Form Z is created in a program such as Word and has several pages. The Word document is uploaded to EchoSign. This converts the Word Doc to a pdf, and then the form fields added in EchoSign. Then that EchoSign form is saved as a template (both document and form fields) in the Library.
    Now, the client who created the Word document comes back a year later with a revised version of the Word Doc that has one fewer page. If that new Doc is uploaded to EchoSign, the form fields from the first version of the form cannot be imported and applied to the new version because the number of pages in the new document doesn't match the number of pages in the old document.
    This appears to be similar to LiveCycle, where you cannot replace the background pdf unless the new file has the same number of pages as the old pdf.
    Unfortunately, it is quite common for these larger and more complex forms to add or delete pages when they are revised, and those are exactly the forms that one would want to avoid rebuilding from scratch.

  • OIM 11g R2 - Setting a field as mandatory while provisioning through catalo

    Hi,
    May I know how i can make a field as mandatory (Red Asterick) while trying to provision an account through catalog wizard.I dont see any option to set required=true while creating a form for an application instance.Thanks.

    login to sysadmin-> create sandbox-> go to form designer->select your form now click on customize link(right top corner)->select your attribute and set the required field as true and then save it. finally export sandbox. run catalog sync job. and then verify if attribute is mandatory in the request form/dataset or not.
    same mentioned in R2 release note

  • I have set form fields as User required and yet the form still prints/save when empty.

    I have set form fields as User required and yet the form still prints/save when empty. I also have an email button on the form but that works correctly by not allowing the user to email the form with the required fields empty.
    What script do I need to additionally restrict both printing and saving if the required fields are empty?
     You would think that just setting that option would restrict those functions the same as it does for the email button. 
    Please be specific with your response if you are gracious enough to offer one. I have been searching the forum all morning for the answer to this and I really didn't understand any of the solutions offered to others enough to use those in my own form.
    The required fields are:
    Social (social security number)
    Name
    Headquarters
    Residence
    The next question I have is if there is a way to make individual signature fields mandatory if they are digital signatures?
     In other words, I don't want the individual to be able to email the form to the next person if he/she hasn't applied their digital signature.

    Saving can always be done, even when mandatory fields are empty.  This is by design.  And that is correct.  Suppose you have a big form and 2 people need to fill it out.  How can you fill out a first part and then send it to the second person without saving.
    Same for printing.  Same for your signature fields.
    What I would do, is to put a "watermark" on the form that you show on preSave and prePrint if the form is incomplete.  Just a static text on your form.  Then the user will see that they need to do more.  Also, on preSave and prePrint, you can show a warning popup to tell the user about the missing fields.  You can then still cancel their action if the user decides not to save/print anyway.

  • How to set field as Mandatory

    Hi,
    I want to set a field as mandatory. It we didn't give any data in a field and save it should not accept the null value how to set it.
    Regards,
    Madhavi

    Hi David,
    I wrote that code but the error comes where  oSBO and  bmt_Short comes. What should i do for that.
    And i gave a code for combo Mandatory
    Dim oForm2 As SAPbouiCOM.Form
                            Dim oCombo As SAPbouiCOM.ComboBox
                            oForm2 = SBO_Application.Forms.Item(pVal.FormUID)
                            oCombo = oForm2.Items.Item("cbocate").Specific
                            If oCombo.Selected.Value = "" Or oCombo.Selected.Value = Nothing Then
                                BubbleEvent = False
                                oCombo.Active = True
                                SBO_Application.SetStatusBarMessage("Category Code should not be left blank")
                            End If
    Its working but an error come 'Object Reference Not added to the Instance of an Object'
    But the same code is working for EditText without any error

  • Setting a field as Mandatory dynamically based on certain condition

    Hi All -
    I am working on ADOBE Interactive forms. I am not able to find out, How to set a particular field as a 'Mandatory field' based on some condition. I am using FormCalc as scripting language.
    i.e: I have a field "RATING". I want to make the next field "COMMENT" as mandatory when "RATING" is less than 3.

    Hi Vishal,
       You need to set the mandatory attribute of the specific field according to your condition. In FormCalc this will be similar to this,
    if (Rating < 3) then
              $.mandatory = "error"
              $.mandatoryMessage = "The corresponding Comment field is mandatory. Please fill"
    else
              $.mandatory = "disabled"
    endif
    The mandatory property can be set as:
    "error" : Makes the field compulsory to be filled before submission
    "disabled" : Makes the field optional
    "warning" : Gives a warning to the user that the field should be filled, but doesn't cause an error on submission
    The property "mandatoryMessage" specifies the message to be displayed to the user when the mandatory field isn't filled before submission.
    Regards,
    Rose

  • Set maximum size in Text Form Field Options for a field in bi publisher RTF

    Hi All,
    How to set maximum size in Text Form Field Options for a field in bi publisher RTF.
    I have a RTF whch is having a field in that i need to add some validation condition but after adding certain condition in Add help text tab ,it is not accepting after certain length, how i can increase the length to unlimited,please help me on this
    Thnaks

    Form fields have some restrictions if your are using version lower than 11g.
    They can accommodate only 393 chars. You can add the text in both status bar and help key, which can in total consume 393 chars.
    If your code logic is more than that, it can be split into multiple form fields as Avinash suggested or you can use sub template logic and handle coding over there. Again in sub template code can be within/outside form fields.
    So there is no option for user to increase the size of form field.

Maybe you are looking for