At least one field filled to submit

Hello

I have a form with 3 text fields with their defined values as REQUIRED.  At least one of the fields must be completed so that the button send email to function.

Is there a script that will change the required fields to the values of optional when at least one of the three contains data?

Thank you

Eric

Hi Eric,.

Just so that you can keep the code in one place, you can wrap the three fields in a subform and have this JavaScript code in the subform calculate the event;

If (TextField2.isNull & TextField3.isNull) {}

TextField1.mandatory = "error";

} else {}

TextField1.mandatory = "disabled";

}

If (TextField1.isNull & TextField3.isNull) {}

TextField2.mandatory = 'error ';

} else {}

TextField2.mandatory = "disabled";

}

If (TextField1.isNull & TextField2.isNull) {}

TextField3.mandatory = 'error ';

} else {}

TextField3.mandatory = "disabled";

}

Concerning

Bruce

Tags: Adobe LiveCycle

Similar Questions

  • How can I validate a form if at least one of the three text fields is selected

    Hi all

    My form has many fields but 3 text fields here that I need to have the Viewer to enter text in a text field before hitting the submit button.

    Don't know how to do in this regard.

    Thank you

    Courier says:

    I can't understand how to ensure at least a field is selected by the Viewer on the three text fields, any thoughts?

    Yes, I played a bit with this idea earlier today, but got distracted by other things.

    What follows is based on the following:

    • There is only one form on the page
    • No validation is involved
    • Each of these fields in the group that needs at least a field has "data-req1" (without the quotes) in its opening tag

    For example, if you have a form like this:

    Add the following just before the closing on the page tag:

    If you try to send the form without find out the name or the email field, you will get an alert dialog box and will refuse to submit the form. But if one or the other or both fields have values, the form will appear.

    In other words, it will work with any number of fields that have "data-req1" in the opening tag. So much that one of these fields has value, submits the form.

  • HP Officejet 4500 G510g: "at least one of the cartridges has a problem"

    My printer has been works well, but all of a sudden last week the message came saying "at least one of the cartridges has a problem", so I took the two cartridges to fill them. I discovered they were already full so it wasn't the problem. I was instructed to turn off and unplug the printer, I did several times and still nothing. I bought new cartridges today and that did not help either.  All the suggestions that I could try running just to buy a new printer?

    Hello

    Please click HERE to access the procedure which should solve the problem.

  • Acrobat Pro XI form: at least one of the six boxes is required to check

    Hello

    I have created a form using Adobe Acrobat Pro XI.

    On a part of the form, there are 6 different boxes in a row, which at least one is required to check.

    There is some javascript that I can use, so that when a user accesses to the textfield object after the boxes to check, he won't let them go further, until they go back and check one of the boxes?

    Or, if I can't have that... a javascript code that will allow them not ' ' the form if one of the boxes is unchecked?

    I'd appreciate any help.

    Thank you.

    The first is problematic and I would not sue it.

    The latter is possible, but requires the use of a script to measure. An easy way to do this is to create a (hidden) text field required with the default 'Off' value and use a script to copy the values from the boxes inside. In this way, if no value is entered, this field validation will fail.

  • Change only one field in a Web application using AJAX?

    I have a script that modifies a WebApp via AJAX.  This works.  Only problem is, I want to update not only one field in the element of the WebApp.  When I submit the change via this script, it does not change the field in question, no problem, but clears (empty out) all other areas.

    Is there a setting/variable/etc that I can use so that it will only change the field and leave the others alone?

              <script type="text/javascript">
                    function setRegLevel(level) {
                       
                        // set action for ajax
                        var action = "/CustomContentProcess.aspx?CCID=23108&OID=" + regID + "&OTYPE=35&A=EditSave";
                       
                        // set appropriate field to search by
                        var dataName = {};
                        dataName['CAT_Custom_37'] = level;
                       
                        var searchOpts = {
                            url: action,
                            async: false,
                            data: dataName,
                            type: "POST",
                            success: function(data, txt, jqXHR) {
                               console.log('OK');
                            }
                        }
                        $.ajax(searchOpts);
                        return false;
                    }
                </script>
    

    You must send the other information and update all the

  • validate if the user has entered at least one element of the page

    The apex Version: Application Express 4.1.0.00.32
    Web browser: Internet Explorer 8
    Oracle DB: 11g Enterprise Edition Release 11.2.0.1.0

    Is there a way to validate whether a user has entered at least one item on a form?

    I have a function:
    function hasPageValues return a Boolean value
    is
    Boolean v_item_found: = false;
    Start

    for rITM in
    (select nom_element
    of apex_application_page_items
    where application_id = Apex_Application.g_flow_id
    and page_id = Apex_Application.g_flow_step_id
    )
    loop
    -the element's value
    If v (rITM.item_name) is not null then
    v_item_found: = true;
    end if;
    end loop;

    Return v_item_found;
    end hasPageValues;

    I call this function returning a Boolean in my posting of the page. It doesn't seem to work. It always returns false. What am I missing and is there a better way to do this type of validation. Sorry I'm new to APEX. Thank you very much!

    SmV says:
    Also, I added the part output in the above code and it still does not work. Always returns false.

    When you have a problem in the APEX you can use debug mode to trace what actually demand. It is advisable to include the code of instrumentation in your program units that will generate useful debugging information. To do this, use apex_debug_message API:

    create or replace function hasPageValues (
        p_app_id  in pls_integer
      , p_page_id in pls_integer)
      return boolean
    is
      v_item_found boolean := false;
    begin
    
      for rITM in (
        select
                  item_name
                , display_as
        from
                  apex_application_page_items
        where
                  application_id = p_app_id
        and       page_id = p_page_id)
      loop
        apex_debug_message.log_message(rITM.item_name || ' (' || rITM.display_as || '): ' || v(rITM.item_name));
        -- does the item have a value
        if v(rITM.item_name) is not null
        then
          apex_debug_message.log_message(rITM.item_name || ' is not null: exit.');
          v_item_found := true;
          exit;
        end if;
      end loop;
    
      apex_debug_message.log_message('hasPageValues = ' || case when v_item_found then 'TRUE' when not(v_item_found) then 'FALSE' else null end);
    
      return v_item_found;
    
    end hasPageValues;
    

    Without data in the page, this gives the following debug trace:

    ...
    0.19096     0.00084     Perform custom validations:
    0.19180     0.00081     ...Validation "hasPageValues" - Type: FUNC_BODY_RETURNING_BOOLEAN
    0.19261     0.09948     ...Execute Statement: declare function x return boolean is begin return hasPageValues(:app_id, :app_page_id); return null; end; begin wwv_flow.g_boolean := x; end;
    0.29213     0.00144     P6_PRODUCT_IMAGE (File Browse...):
    0.29352     0.00082     P6_IMAGE (Display Only):
    0.29434     0.00075     P6_PRODUCT_ID (Hidden):
    0.29509     0.00105     P6_PRODUCT_NAME (Text Field):
    0.29614     0.00083     P6_PRODUCT_DESCRIPTION (Textarea):
    0.29697     0.00104     P6_CATEGORY (Radio Group):
    0.29801     0.00151     P6_PRODUCT_AVAIL (Radio Group):
    0.29952     0.00079     P6_LIST_PRICE (Number Field):
    0.30030     0.00071     hasPageValues = FALSE
    0.30102     0.00066     ......Did NOT pass
    0.30168     0.00080     Add error onto error stack
    0.30249     0.00079     ...Error data:
    0.30327     0.00299     ......message: Page has no values
    

    While with a set of element values, we get:

    0.07573     0.00107     Perform custom validations:
    0.07680     0.00094     ...Validation "hasPageValues" - Type: FUNC_BODY_RETURNING_BOOLEAN
    0.07774     0.00231     ...Execute Statement: declare function x return boolean is begin return hasPageValues(:app_id, :app_page_id); return null; end; begin wwv_flow.g_boolean := x; end;
    0.08005     0.00105     P6_PRODUCT_IMAGE (File Browse...):
    0.08109     0.00077     P6_IMAGE (Display Only):
    0.08187     0.00094     P6_PRODUCT_ID (Hidden):
    0.08281     0.00074     P6_PRODUCT_NAME (Text Field):
    0.08354     0.00087     P6_PRODUCT_DESCRIPTION (Textarea):
    0.08442     0.00072     P6_CATEGORY (Radio Group):
    0.08514     0.00067     P6_PRODUCT_AVAIL (Radio Group): Y
    0.08581     0.00112     P6_PRODUCT_AVAIL is not null: exit.
    0.08693     0.00076     hasPageValues = TRUE
    

    The two that appear to be the expected behaviours. What happens when you do this?

  • data from one field to another field of text on the next page

    Hi all

    Hi I have a form that contains data from the data binding, the thing is the data maps to a certain text field and if this field is filled in, it should continue on the text field located on the page immediately after this one. the reason for using the text field instead of subform and make repeating is that the customer does not change the position and the structure of other fields as a result of this area, they are OK with the amount spilled in the following text field.

    is there a script for the same disease in Java script or form Calc.

    Thanks in advance.

    de1209

    It is not as simple as it sounds. You won't be able to split the field during bonding time. The entire string must go on the ground and only after that he completed the biinding can change us around. A colleague of mine did for an interactive field and it's a very complicated code. Here is a link to his blog entry that describes what she did:

    http://blogs.Adobe.com/lcdesigner/2008/07/an_example_of_splitting_text_a.html

    But this is only part of the problem... once separate you the information in two areas that you need to recombine into one field that the data submitted can represent correctly again. If you reverse the process in a preparatory stage.

    Make sense?

    Paul

  • FF has an option for AutoComplete is a form all like Google, or full auto work only on one field at the same time?

    Is there a way of really auto complete a form in FF the way Google, or is full auto only one field both in FF?

    You can watch an extension as Autofill Forms.

  • At least one number and one letter in English are required in the password.

    At least one number and one letter in English are required in the password.

    Page of the router is not fully displayed

  • Devices on all my iCloud preferences says "this device can be used to receive codes of audit ID Apple." How can I change this if at least one, if not several, can receive the verification code?

    Devices on all my iCloud preferences says "this device can be used to receive codes of audit ID Apple." How can I change this if at least one, if not several, can receive the verification code?

    Try to go here and see if you can add them to your Apple ID.

  • login password field fill

    I have an end 2013 27 "iMac El Capitan 10.11.2 running. The connection password field filled with erroneous stars sometimes, when I wake it from sleep mode. Sometimes its OK sometimes not.

    Because it was intermittent, I figured though it might have been caused by my cat lying on the keyboard when the Mac is in mode 'sleep' but I moved the keyboard out of the way and it still happens. The only solution I have is to stop and restart the Mac, but it does not work today. The login field filled again until I have stop a second time.

    The other thing that sometimes happens is that each letter is typed a dialog box appears offering what seems to be variants of the letter. for example the letters with accents.

    Try another keyboard.  Intermittent error may be imminent failure of a keyboard, in my experience.

  • Is it possible to sort messages in WLM by more than one field at a time?

    Sort messages in Windows Live Mail

    As the help "?" button in the desktop app Windows Live Mail is no help whatsoever *, after much research I landed at MS Answers. Hope someone here can answer what I believe is a simple enough question, although well beyond the capabilities of the foregoing under construction using WLM... Here goes-

    Is it possible to sort messages in WLM by more than one field at a time?

    If I sort my messages received by the field 'From' - by clicking on the field header (whenever you click the header, it changes to alphabetical, reverse alphabetical order) - by default each group of messages from the same sender are listed in order by date/time, earlier at the latest, from top to bottom (opposed to the default order when the messages are sorted by date and time upon arrival which puts the last (most recent) mail messages has received at the top). After you sort messages by sender, is it possible to then sort these messages grouped by date, with the newest messages at the top of the list?

    * Is there a procedure/channel "correct" to say Microsoft's help on the web for MS Office & other apps - like Windows Live Mail - how useless? In the interest of Microsoft, this gap & go back to the built-in Office 2000 help, etc., with an option to get help online, i.e. through the Forums, if the system cannot answer your question.

    Hello UKdeejay,

    The best place to ask your question of Windows Live is inside Windows Live help forums. Experts specialize in all things, Windows Live, and would be delighted to help you with your questions. Please choose a product below to be redirected to the appropriate community:

    Windows Live Mail

    Windows Live Hotmail

    Windows Live Messenger

    Looking for a different product to Windows Live? Visit the home page Windows Live Help for the complete list of Windows Live forums to www.windowslivehelp.com.

  • Error: "at least one tracks is protected"when trying to burn some songs CD's favorite original

    Original title: the protected when burning music

    I hope that this question is in the right place.

    I am trying to burn some my tracks favorite original CD in my library on a blank CD, so I have all my favorites on CD one.

    The problem I'm having, is that when I start to the burn, a window appears and says... "that at least one of the tracks is protected"

    Where to look, or go to find that trace is in order to remove it, and then burn the rest?

    Thanks in advance.  :-)

    Hello

    It seems that burning rights are missing for one of the tracks.
    It's ok to burn the tracks. If CD burning rights are missing on the slopes, then you will burn successfully tracks.

    If the song file is protected by the rights of use, these rights may allow for playback of the song on the computer but prohibit burn them on a CD. If the Information button appears next to the song in the burn list, click the button to see more information on the issue. For more information on usage rights, see the DRM: frequently asked questions.

    For more information, see burn a CD or DVD in Windows Media Player: frequently asked questions

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Photosmart D110a. Error message: at least one of the cartridges has a problem.

    Photosmart D110a, Windows 7 32-bit, error message: at least one of the cartridges has a problem. Will print black if the deleted color cartridge. New cartridges does not solve the problem. Everything suggests not tried twice, cleaning, disconnect, etc..

    There is a document with the right information on how to help solve this problem located here.

    It seems that you have already made certain steps to help with this. If the printer is under warranty, then you may want to contact the HP Support on this device.

    Let me know if it helps.

  • How to guarantee a box has at least one active record

    Hello

    I have a table block (two-elements of text with a box,

    I want to prevent the user from leaving the form unless there is at least one active record?

    in the item properties box

    When checked the value property value = 1

    value when the value of uncontrolled property = 0-> this unchecked value must be 0. If you can find out if the box is checked or unchecked at least

    then add article no db to the block. Use the text-to-speech function SUM this out of the box.

    If at least one checkbox is selected, this summary will be > 0

    If all elements of the block check box is not checked, this article summary = 0

    maybe help you.

Maybe you are looking for

  • Firefox gets black

    half of ff gets black on Facebook During the passage of a message

  • CouponDropDown after upgrading FireFox

    After the last update of Firefox (version 16.0.2) I get words randomly on a page of a site that are highlighted. These pointed words link to websites where I can win stuff. When I put my cursor on them I see a text saying: Please click here to contin

  • HP OfficeJet Pro 8000: No power to my HP OfficeJet Pro 8000 printer

    I was outside for a few days and when I came home had no power light.   Our power went out briefly while I was gone.     It is not connected to a surge protector.

  • Creation of Data Type when the script crashes LabVIEW

    When you use the script (LV2010) if I call the Create method of Data Type (available appeal node when a reference to the BD is cable), if I have all but 1 up to the wiring on 'style' terminal, LabVIEW, it blocks. LabVIEW then restarts with an error m

  • extraction of your LabVIEW instrument

    Hello Does anyone know why your Extraction icon does not work in a Labview Instrument? When you try to use the Instrument of LV in Multisim, Multisim is quitting with an unknown error. If I take on the Extraction of tone icon and rerun Multisim witho