Do some required fields in a repeating subform - verified/validated on preSubmit

I have a form that contains a repeating subform - sense, there is only one subform (Western flowed) with binding set to repeat a 1 Min and Max of 15 (subform extensible so dynamic).

In the subform are 5 fields (example below):

First name

Family name

Email address

Age

Sex (radio button for men and women)

If the user enters a value for the first name, then the name, the age and the gender option button should become "necessary". Similarly, if the first name value is empty/null, then the fields first name, age and sex radio button should be optional.

I understand that this can be achieved quite easily if the subform was not repeat:

If (!) ((this.isNull))) {//if FirstName field is not null

LastName.mandatory = 'error ';

Age.Mandatory = 'error ';

etc.

}

else {//if field is null

LastName.mandatory = "disabled";

Age.Mandatory = "disabled";

etc.

}

However, how this is achieved in a repeating subform?  If the above script is placed in the repeating subform, it affects ALL repetitive lines in the subform group once rendering. Instead, I need the mandatory conditional status treated on a basis of single instance (online).

Thanks in advance

Hello

I do not see a problem to make this work even with repeated subforms.

Here's a sample for you.

https://files.Acrobat.com/preview/7dc1e4aa-5160-4058-a59e-77b77dbf658f

I hope this helps.

Tags: Adobe LiveCycle

Similar Questions

  • Error: Accounting information is not complete. Some required fields are not filled out correctly.

    Before I left to go on vacation, my Acrobat Pro XI worked perfectly. No hiccups, no errors, etc. Now that I'm back and I need to print a PDF in it, I constantly get an error message appear when I hit the "print" key.

    The accounting data are not complete. Some required fields are not filled out correctly.

    I don't know what this message means because I went through all imaginable areas in the menu printing, nothing helps. I checked tools, sign, comments, everything I can think of to try and see what the field is not filled correctly, but nothing fits. From now on, I can't print anything at all of Acrobat Pro and I really need to get this print for a meeting later today. So if someone could try to help, I appreciate it. Thank you.

    If the problem comes from the printer driver. While IT worked on my machine Friday, they have updated the driver and it automatically sets the posting to Enabled. Now that he is set to disabled, I can print without problem. So I guess it's fixed for now and if it comes back I know exactly what to look for.

  • How to successfully reset the fields in a repeating subform

    Hello

    I'm more and more frustrated just trying to create a form dynamic xml () with lifecycle designer.

    As a test, we build a form that contains a repeating subform.

    We want to reset the fields in the current subform and only the current subform using the following snippet:

    var som_kdnr = this.parent.somExpression + ".." Kopfzeile.Kundennummer ';

    xfa.host.resetData (som_kdnr);

    But instead of reset the field "Kundennummer' in the current subform, copy the following code resets this field in all subforms.

    And to make this behavior even more "interesting" than that happens only if we use Adobe Reader XI - if we use Foxit Reader, the script does the job...

    How can we get this running in two players?

    You should not add a string to the somExpression, you must Access the Kundennummer field and then use the somExpression instead of do it yourself.

    this.resolveNode("Kopfzeile.Kundennummer").somExpression;

  • Value of the field in a repeating subform

    I have a repeating subform with text for City, State, and Zip fields. I want to take everything that the user enters in the first (or only) instance fields and automatically put this information in a city, State or Zip field in a completely different section of the form.  I just need to copy on the first instance of these fields if there are multiple instances.  I can get this to work if the user adds an instance of the repeating subform and add a second city, State and/or Zip, but I can't make it work if there is only one instance of the repeating subform.  It does not work if the user adds an instance but does not come to the city, the State or the Zip.  I need to run regardless of the number of instances.

    For example, here's what I put in the case of 'change' of the city (inside the repeating subform) field and it works if there is another instance added:

    Form1. Page3.CityOther.RawValue = form1. Page1.SubformRepeat [0]. . RawValue City [0]

    (It's using FormCalc. I couldn't JS to work).

    I would put in the case of page layout: loan of form1. Page3.CityOther (in formcalc):

    If (form1. Page1.SubformRepeat [0]. . IsNull City [0] == 0) then

    $ = form1. Page1.SubformRepeat [0]. City [0]

    endif

    In this way, it has nothing to do with the instance manager and just make an equal to another if there is a value in the first.

  • Javascript code necessary for the reset button to remove required fields

    I have a form with a reset button. I have check boxes that once verified will require some required fields on this form. When I hit the reset button, it will clear the text entered, but not the requirement on the fields. Is there a javascript code I can add to the reset button which will remove the requirements on a list of fields, and if so what would it be? Any advice would be greatly appreciated. Thank you.

    Just the property required of each field set to false:

    getField("text1").required = false;

    getField("text2").required = false;

    Repeat for all other fields

  • referring to an object in a repeating subform

    Trying to get the value of a text field in a repeating subform (lets call it the subform "Identify") of my form to be set to the value of "TextField18" in the corresponding instance of Subform subform 'groups '.

    In more detail:

    In the form, I ask the question - groups how do you have? The number of this answer is the number of instances of the subform 'Groups' that I have. Within this subform is a text field ("text Field18") where the user will enter the name of the group.

    Later, in a completely different section of the same shape, I have a subform called "identify." I understand how to set the number of instances of "Identify" to match the number of instances of 'groups '. I want to do is have a field 'Identify' display the name of each group (as he entered "TextField18" in the "Groups" subform) - one per instance of the subform.  So if the groups were in Orange, red and purple entered instances of 1-3 respectively on the subform "Groups". I want the field 1 of the "Itentify" subform to autopopulate with Orange and the field in case 2 of autopopulate pending with red and so on.

    Is this possible?  All advice is appreciated!


    Hello

    Your repeated subforms, groups and identify, will have a property index to identify their appearance.  Thus, in the case of calculation of the object textfield to identify using JavaScript place the following code;

    xfa.resolveNode ("groups [" + Identify.index +"]. TextField18") .rawValue;

    This will return the corresponding value in the subforms of groups.  Note You may need to adjust the SOM expression if the groups and identify them are not at the same level.

    Bruce

  • How can I restrict people to print, save or send the form unless all required fields are filled?

    I made a form with several fields. The form will be on an intranet page, and people will be able to download the form, fill it out and save you, by post or print it out.

    However, I want to fill all the required fields. How can I prevent that people are able to save, send or print the form when some required fields are not filled.

    It is not possible. But you can post a message.

  • Required fields forms Adobe XI

    Hello

    I am new to JVS and I need a little help from you guys.

    I have a form created with Adobe XI with some required fields. The only thing I found on the forum in fact to force the user to fill in these fields was to add a JVS code to a button to the pop-up window, a message indicating to the user that the field... .this... .and this... and this... must be filled. The code looks like:

    var emptyFields = [];

    for (var i = 0; i < this.numFields; i ++) {}

    var f = this.getField (this.getNthFieldName (i));

    If (f.type! = "button" & & f.required ") {}

    If ((f.type=="text" & & f.value== "") |) (f.type=="checkbox" & & f.value=="Off")) emptyFields.push (f.name);

    }

    }

    If (emptyFields.length > 0) {}

    App.Alert ("error! ("You must fill in the following fields: \n" + emptyFields.join ("\n"));

    }


    What I want to do, it's when the user ends to complete the entire form, he's going to push a button that will validate the form (above the code) and then trigger a save us to dialogue.

    My question is to know how to make a link to existing code, another code for save us function that will jump upward from the economy than us to dialogue ONLY if the user filled the form, otherwise will give the java script error message.

    NOTE: I tried with properties button / Action menu and added THE FOCUS the above JavaScript code and then execute a menu / save us... but this will jump to the top of the error if the required fields are empty and also save it without worrying about us dialogue the user will fix or not empty fields .

    Your help is very appreciated,

    Adrian,

    Add this line at the end of the code:

    of other app.execMenuItem ("SaveAs");

  • Required fields in a block?

    I create a sign in sheet using Livecycle.  I want to do some required fields if the user begins to fill in this block of fields.

    This is what it looks like:

    First name

    Family name

    E-mail

    Degree

    Address

    City, State, Zip

    First name

    Family name

    E-mail

    Degree

    Address

    City, State, Zip

    First name

    Family name

    E-mail

    Degree

    Address

    City, State, Zip

    If someone fills here name, is there a way to force to complete their last name and email address?

    When I tried the required fields it makes necessary to the entire worksheet, not only one record.

    Thank you

    Sorry, there was an error in my script, that the first line should be:

    If (! this.isNull) {}

    or

    If (!) ((this.isNull))) {}

    Support additional or not closed support according to your preferences!

  • Ignore the validation for required fields when you navigate to other tabs

    I have 2 tabs in my application. In the 2nd tab, I save a command button and the 3 required fields. I've added my validation to my managed bean method, for example:

    < af:inputText id = "MyField", validator = "{#myBean.validateField} ' < / af:inputText >"

    The validation works well.

    The problem is, as these 3 fields are required fields in my 2nd tab, so I left blank for these 3 fields and try to navigate to my 1st tab, I got validation of ADF error, saying: "you must enter a value.

    I don't even click the button Save, why I get the validation error.

    I tried to put SkipValidation = "true" in my page for my 2nd tab definition file, it does not work.

    Please advise and thank you.

    Hello

    I think that you should seek immediate ownership of your tab (showDetailItem or perhaps panelTabbed) and set the value to true.

    Kind regards

    Sébastien

  • Required field in the subform "hidden".

    I have a set of 3 radio buttons. If #1 is selected, then a subform with a field appears. When the poster, there is a required field. It all works very well. What does not work is if the user selects #1 then decides to choose #2 instead, the subform correctly is "hidden", but the field is still regarded as required. I don't know how to solve this problem. Here's the script:

    Create a variable to hold the document object

    var v1 = form1.page3.accessApps.TextField11.rawValue;

    accessApps

    If

    ((v1 == "") || (v1 == null) )

    {

    xfa.host.messageBox ("Please list the applications in that the associate should have access");

    xfa.host.setFocus ("form1.page3.accessApps.TextField11");

    }

    Add just the line of the script that you use to show/hide the subform, or the field.

    if (x)
    {
         FieldName.presence = "visible";
         FieldName.mandatory = "error";
    }
    
  • Repeating subforms after the application of usage rights

    Hi guys,.

    I was going crazy trying to get this problem solved in recent weeks. No unfortunately I cannot post the PDF because of privacy issues, but I hope you might be able to point me in the right direction for what could be causing the problem.

    The problem

    We lack a problem once the LiveCycle PDF is opened in Acrobat Pro and enabled usage rights. Once save us the PDF file, then open, Extensible subforms start behaves badly. By example, when we re - open this document, rather than the subform with 1 instance (as it should be by default), it opens with several instances of 2, 3, 6, or 20).

    This problem occurs only one time use rights have been activated on the document, and it's always the same number of instances is repeated.

    Details of the document

    The PDF document was created in Indesign and then imported into LiveCycle to apply interactivity. There are a total of 17 pages

    There are several subforms in the entire file on the different pages. Each of these subforms has a button below them which allows the user to add additional instances of the subform (using the built-in script that generates LiveCycle). Each subform has a minimum number of limit 1 and maximum 20. The "original" counter has been set to 1, but it seems that LiveCycle removes this value if it is the same as the minimum number.

    This document does not tie into any database. It is simply an interactive document that allows users to show/hide the pages based on the boxes they check on the first page (some page visibility changes). The idea being, the customer can save the form once they have filled in the required fields, and then send it back, so recording feature is necessary (this is why we need the rights to use).

    What I've tried so far

    I did a lot of reading on the subject, and I've seen mention of people with non-unique names subforms or empty subforms may cause the problem. I checked the document and subforms all have a unique name and there is no form under vacuum.

    As a way to try to identify what elements might be the cause of the issue, I've resorted to deleting several pages of the document to track a specific item which could be causing the problem, however, I didn't have much luck with this. The removal of most of the pages other than the unique repeating subform has resulted in the subform repeat 6 to 8 times (don't remember exactly, but it's already repeated 20 times)

    Any ideas?

    I know it's a bit difficult without being able to see the document directly, but I hope someone might have a suggestion for what I can remember. Is it just screwing things up usage rights, or is potentially something in my code which comes into conflict with the rights of use. The thing I find most confusing on this scenario is the seemingly random to see how many instances. The first subform before loads the available maximum limit, but the rest of the forms more load with only 2 instances (when they also have a maximum limit of 20 pieces).

    I have read a few forums where people suggested Reader Extensions, but according to Adobe system requirements, it does not correspond to what we are trying to reach. There is no database interaction at all - we demand that the ability of users to save the PDF locally.

    If anyone can offer any suggestions for where I might need to look at the issue, I would be very grateful. Thank you!

    Hello

    Your description of the problem is very detailed. Send me a private message if it is possible to send the form to a person instead of posting publicly.

    Here's a thread repeating subforms that can help: registration complete form duplicates subforms I used a line of script console.println to try to help identify the problem.

    I try and minimize the number of subforms flowed and don't use them only where they are required for the content of this subform. In all other cases, use positioned subforms.

    Minimum number serves only one purpose when you have a button that allows you to remove instances. Minimum number of 1 means that the user can delete instances, but not the last remaining instance. Unless you need to, you could take this.

    I don't think that the problem is because the form is activated. There must be something else in the background.

    Try to open the Javascript Console in Acrobat/Reader (by pressing command + J) and see if errors and warnings. Also, put in a console.println script to display the nodes in the console.

    Good luck

    Niall

  • Help please - at wits end with repeatable subform.

    I know it should be easy and basic, but after about 20 hours, I still don't know what I'm doing wrong.

    I want just one button to add another subform that contains the fields that must be met.

    It is a sign of the event in the journal I want to distribute iPads.  It has some user details then they would click on submit and it would add the subform to the next participant to complete.

    Thank you much, long in advance, for your help.

    http://www.gatorserver1.com/links/SIS-LC-v17.PDF

    I ' watched ved your form and cannot begin to understand the coding you for the add section button (you're away from me), but I can make it work with a simple script.

    1. your subform must be sent.

    2. you define the information in "repeat subform for each data element" in the binding tab

    3. I added a blank space at the bottom of the subform flowed in the Layout tab to make a full page

    4. place the button in the subform flowed

    5. use this script ' Form1.Page1.AttendeeSubform.instanceManager.addInstance (1); "in the click event

    6 examine the properties and make sure that the version "run as" is compatible with what you're doing

    7. save the form a dynamic not a static

    I hope this helps.

  • Record of. PDF with repeatable subforms adds a new Instance.

    Hey everybody,

    I have worked with dynamic forms LiveCycle Desinger for a few years now, and this is the first time I see this kind of behavior.

    I have a very big form in LiveCycle Designer. There or 50 subform repeatable sections. I save the designer, and then open it in Adobe Acrobat X Pro. Acrobat Pro, whenever I have re-record it then re-open, a new instance is added to each subform repeatable.

    If I fill it, save it, and then reopen it, he has all my info, as well as a subfrom empty additional below each section.

    I have no formcalc in the presave, nor do I have any global fields in my form... In addition, each single repeatable subform named. I am at a loss.

    I have a sample of this pdf here. If you have a different file hosting site you prefer, do let me know.

    I'd appreciate any help anyone could offer. I don't know what is the cause.

    -Scott

    Hello again everyone,

    I found the answer to my problem. I had a devil of a time from Googling the problem, so I'll put some sentences that I tried below, where like-minded individuals has a similar problem.

    The main problem was with data binding. I had left the data binding for all as the default 'using the name (...) '. I was under the impression that as long as the sibling elements have been appointed to the same thing, there is a conflict. I was wrong.

    In my form, I used static subforms to organize the fields available in a dynamic repeatable subform. The static subform called "sf_positioning". It happens that this field has an uncle named the same thing. It was close enough to provoke a conflict, making the repeatable subform record an additional instance whenever the data has been saved. This can be corrected in one of two directions... ((1) set one of the subforms wrongful use "no data binding" (use this only if the content of the subform is not be exported or merged) or 2) give the subforms of unique names.

    I need to look if everything must be particularly well appointed... As I said, it makes more sense to me that the only restriction should have been on the sibling elements, but I will in the future to make sure there are at least three degrees of separation between just like named controls/subforms.

    Hope that helps someone else...

    And what follows is some of my attempts at Googling the problem. I hope that this will facilitate the solution to find for others:

    -Player which extends shape Dynamics breeze repeating subforms.

    -Economy adds a new instance of the repeatable subform.

    -Whenever I save, I get more empty instances of a subform repeatable.

    -Repeatable subforms not working does not go as planned.

  • Required fields

    Given:

    form with several fields of text entry.

    the value of LOV some fields becomes invalid - not required for the operation.

    To submit:

    pl/sql procedure takes values of all the elements and, based on the values passed did he magic.

    Problem:

    required fields are marked as "required" in the apex. When LOV disables them, of course, they have a value, and a problem during "submit page" (e.g..

    "First Name must have some value. »).

    I'm hesitant to mark all items as 'non-compulsory' unceremoniously since all the elements are necessary (when they are activated by LOV) and the Red "*" is a good way to remind a user to enter a value.

    What would be a better solution?

    hope it makes sense

    P.S. help to 'Value' for the element leads to believe that 2 conditions must be met so that automatic checking of ' not null ' kick - point must be visible and '' necessary '' status = "YES". This is not true. required = yes and "point invisible triggers still control null nit.

    AZZ,

    You can set the attribute 'Required value' = 'No' and let the model as "Necessary", it will show the "*" when the element is visible. Then you can create a new type Validation "IS NOT NULL" to a Condition of ' Item = value '.

    Thank you

    Erick

Maybe you are looking for