Can you make subsequent field compulsory only if the field before has data entered into it.

  • Profile Image
    LisaBirchill
    Asked on July 05, 2012 at 12:20 AM

     

    We have an employment application form and we have made the most recent employer fields required.  We would like to know if the 2nd and 3rd previous employer and associated fields can be made required if data is entered into employer 2 name field.

    Data is entered into field Employer 2 Name

    Then the following fields "Employer 2 from date", "Employer 2 to date", "Location of Employer 2", Employer 2 Telephone, Position & Responsibilities at Employer 2, Last salary at Employer 2 and Employer 2 referee's name and position, reason for leaving employer 2.

     

    Then do the same for Employer 3?

     

     

  • Profile Image
    jonathan
    Answered on July 05, 2012 at 02:11 AM

    Hi,

    If you use Condition Logic on the form to Show/Hide fields, and made Employer 2 and 3 a required field, the user will be force to fill-in a required field.

    Please try this form to better understand the idea.

    Using the sample form, Employer 1 field is not required -- if empty, the form can be submitted without the required Employer 2 and 3.

    If Employer 1 is filled, Employer 2 will be force required. Then using another rule, the Employer 3 can be force required or not base on the Employer 2 input.

    If NA is inputed to Employer 2, then, Employer 3 will not be required.

    Hope this help. Please inform us if you require further assistance.

    Thanks.

  • Profile Image
    LisaBirchill
    Answered on July 05, 2012 at 08:06 PM

    Thank you for that, but I really don't want to hide the subsequent fields, as I want all fields to be visible on printing of the form.  Is there another way?

  • Profile Image
    LisaBirchill
    Answered on July 05, 2012 at 08:06 PM

    Thank you for that, but I really don't want to hide the subsequent fields, as I want all fields to be visible on printing of the form.  Is there another way?

  • Profile Image
    jonathan
    Answered on July 05, 2012 at 08:22 PM

    If such is the case, perhaps using the source code embed for the form there will be a way.

    Can you use source code embed? Do you have your own website where the form can be embedded using its source code?

    Using the source code embed will allow infusion of custom codes such as javascript or PHP to create functions that can me a field required or non-required state.

    Please update us.

    Thanks.

  • Profile Image
    LisaBirchill
    Answered on July 05, 2012 at 08:53 PM

    When I select "Setup & Embed" then select the "Source Code" icon and then copy the code.  Whenever a person attempts to print the form, IE9 crashes. 

    So I am using "Setup & Embed" then select the "Embed Form", then Select other platform "Dreamweaver", then tick checkbox, secure form. Then created a dreamwever page for it and FTP'd this to my external web server. Note: this is the only way to get the form to work for submit and pritning without crashing.  I am unable embed on a page in our public website content management system, as the CSS is locked down and some form fields sit on the right of the large left container in the web page template and are hidden by the narrower right hand container in the web page template.

    Also, I am a little confused, as I can read and understand some php and javascript code, but don't know how to write it.

  • Profile Image
    jonathan
    Answered on July 06, 2012 at 05:39 AM

    Hi,

    When I select "Setup & Embed" then select the "Source Code" icon and then copy the code.  Whenever a person attempts to print the form, IE9 crashes. 

    You are correct on this. I was able to reproduce the crash when printing using this URL http://external.barker.nsw.edu.au/employment/

    I will create a separate ticket for it for our dev team to check.

    I am not familiar with your CMS website, but what I had in mind previously was using the 'source code', then add javascript function to make certain related fields 'required' or 'not-required' base in on input

    Example:

    On this sample form (clone of your form using source code).

    I can add a custom javascript function to check if Employer 1 field is empty or filled-up.

    If filled-up, the date fields Employer 1 From / Emploer 1 To should become a 'required' field.

    If empty, ignore and proceed next

    Please inform us if you have further inquiry.

    Thanks

  • Profile Image
    LisaBirchill
    Answered on July 08, 2012 at 06:43 PM

    1.  IE9 Crashing

    - I changed the banner image to a file uploaded to JotForm so it has https. I then selected "source code" and pasted this into the body of my web page.  Then  I don't know if your end did anything, but I deleted the cache and now it prints perfectly every time. 

    - But if I select Setup Embed \ Embed Form \ select "secure" and copy the code and then paste this link into my web page, then preview my page and open the link, then try to print the form, it crashes IE9.

    2.  Making subsequent fields required if data is entered into field before

    - Thank you for your response, but it appears that if I don't get what I want with what you have created.  What I am after is that when an applicant enters data into Employer 2 Name Field - then all the following fields become required. The employer 2 from Employer 2 To, Location Employer 2, Employer 2 Telephone, Position & Responsibilties at Employer 2, Last Salary at Employer 2, Employer 2 Referee's name and position, Reasons for Leaving Employer 2.  Then I want to repeat the same for Employer 3.  If you can do this, then how do I get the custom javascript function into my form?

  • Profile Image
    jonathan
    Answered on July 08, 2012 at 07:04 PM

    Hi,

    - I changed the banner image to a file uploaded to JotForm so it has https. I then selected "source code" and pasted this into the body of my web page.  Then  I don't know if your end did anything, but I deleted the cache and now it prints perfectly every time. 

    I created a ticket for it to our dev team previously. They must have fixed the issue already.

    2.  Making subsequent fields required if data is entered into field before

    What I am after is that when an applicant enters data into Employer 2 Name Field - then all the following fields become required. The employer 2 from Employer 2 To, Location Employer 2, Employer 2 Telephone, Position & Responsibilties at Employer 2, Last Salary at Employer 2, Employer 2 Referee's name and position, Reasons for Leaving Employer 2.  Then I want to repeat the same for Employer 3.  If you can do this, then how do I get the custom javascript function into my form?

    In my sample form, I do not have the custom code yet. What I did was only to 'show' you the concept of using the form source code.

    If you know how to embed using the source code, then you can find or learn custom codes that can manipulate the page/form functionality outside of JotForm.

    I will see if I can try to create the form base on your requirement using the source code with custom javascript. But I do not want to commit a promise that I will have it at once. I will only create a concrete sample to at least give you more idea on what I was trying to share to you.

    Please inform us if you have further inquiry.

    Thanks.