Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 repeatable fields in single form are not properly working #65

Open
1 task done
suchitpatel0722 opened this issue Sep 4, 2023 · 1 comment
Open
1 task done
Labels
bug Something isn't working
Milestone

Comments

@suchitpatel0722
Copy link

suchitpatel0722 commented Sep 4, 2023

Describe the bug

When I'm trying to use 2 Repeatable fields in a single form I fill both repeatable fields and try to submit the form but It will show an error like "One or more fields have an error. Please check and try again."But I checked all mandatory fields are properly filled with proper data and all other fields are also filled with appropriate data so why did this error occur?

also, I have tested that when I fill all fields data without adding any repeated fields then the form has been submitted

Steps to Reproduce

Join Our Team

Form tab contents

<div class="row">
        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
            <div class="form-group">
                <label class="college-add w-100">Address [text* HCT-Address class:form-control]</label>
            </div>
        </div>
        <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
            <div class="form-group">
                <label class="college-city w-100">City [text* HCT-City class:form-control]</label>
            </div>
        </div>
 
        <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
            <div class="form-group">
                <label class="college-state w-100">State [text* HCT-State class:form-control]</label>
            </div>
        </div>
        <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
            <div class="form-group">
                <label class="college-zip-code w-100">Zip Code [number* HCT-Zip-Code]</label>
            </div>
        </div>
    </div>
    <h3 class="emp-history">Employment History</h3>
    <span class="presetn-past-emp">List below all present and past employment starting with your most recent employer (last five years is sufficient). You must complete this section even if attaching a resume.</span>
    <div class="row current_employer">
        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <div class="form-group">
                <div class="radio_main current-employer w-100 d-flex flex-column">Current Employer ? [radio Current-Eployer use_label_element "Yes" "No"]</div>
            </div>
        </div>
    </div>

    <div class="main-rep-one">
    [field_group EmpHistory id="employment-history" tabindex:1] 
    <div class="row">
        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
            <div class="form-group w-100">
                <label class="employer-name">Name of Employer [text* employer-Name class:form-control]</label>
            </div>
        </div>
        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
            <div class="form-group w-100">
                <label class="employer-phn">Phone Number [tel* Employer-Phone-Number]</label>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
            <div class="form-group w-100">
                <label class="employer-bt">Type of Business [text* employer-Type-Business class:form-control]</label>
            </div>
        </div>
        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
            <div class="form-group w-100">
                <label class="employer-supervisor">Your Supervisor's Name [text* employer-supervisors class:form-control]</label>
            </div>
        </div>
    </div>
    <div class="row employer_address">
        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
            <div class="form-group">
                <label class="college-add w-100">Address [text* employer-address class:form-control]</label>
            </div>
        </div>
        <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
            <div class="form-group">
                <label class="college-city w-100">City [text* employer-city class:form-control]</label>
            </div>
        </div>
   
        <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
            <div class="form-group">
                <label class="college-state w-100">State [text* employer-State class:form-control]</label>
            </div>
        </div>
        <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
            <div class="form-group">
                <label class="college-zip-code w-100">Zip Code [number* Employer-Zip-Code]</label>
            </div>
        </div>
    </div>
    <h3 class="date-emp">Dates of Employment:</h3>
    <div class="row employer_dates">
        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
            <div class="form-group">
                <label class="emp-date-start">From [date* Emp-From-Date]</label>
            </div>
        </div>
        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
            <div class="form-group">
                <label class="emp-date-end">To [date* Emp-To-Date]</label>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
             <label class="position-duties w-100">Your Position and Duties [text* employer-positions-duties class:form-control]</label>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <label class="position-duties w-100">Reason for Leaving [text* employer-leaving-reasion class:form-control]</label>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <div class="radio_main contact-this-employer w-100 d-flex flex-column">May we contact this employer for a reference? [radio contact-employer use_label_element "Yes" "No"]</div>
        </div>
    </div>
 [/field_group]
    </div>
   
    <div class="row reference_row">
        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <h3>References</h3>
            <p>List below three persons not related to you who have knowledge of your work performance within the last three years.</p>
        </div>
    </div>
   <div class="two">
    [field_group references id="references-data" tabindex:10]
    <div class="row">
        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
            <div class="form-group">
                <label class="first-name w-100">First Name [text* References-Fisrt-Name class:form-control]</label>
            </div>
        </div>
        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
            <div class="form-group">
                <label class="last-name w-100">Last Name [text* References-Last-Name class:form-control]</label>
            </div>
        </div>
        <div class="col-lg-4 col-md-4 col-sm-6 col-xs-12">
            <div class="form-group">
                <label class="ref-phone">Phone Number [tel* References-Phone-Number]</label>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
            <div class="form-group">
                <label class="college-add w-100">Address [text* References-Address class:form-control]</label>
            </div>
        </div>
        <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
            <div class="form-group">
                <label class="college-city w-100">City [text* References-City class:form-control]</label>
            </div>
        </div>
    
        <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
            <div class="form-group">
                <label class="college-state w-100">State [text* References-State class:form-control]</label>
            </div>
        </div>
        <div class="col-lg-2 col-md-6 col-sm-6 col-xs-12">
            <div class="form-group">
                <label class="college-zip-code w-100">Zip Code [number* References-Zip-Cod]</label>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
            <div class="form-group">
                <label class="occupations-ref w-100">Occupation [text* References-Occupation class:form-control]</label>
            </div>
        </div>
        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
            <div class="form-group">
                <label class="college-zip-code w-100">No. of Years Acquainted [number* References-Acquired-Years]</label>
            </div>
        </div>
    </div>
    [/field_group]

Mail tab contents

[EmpHistory]
Employment History #[group_index]
Name of Employer: [employer-Name]
Phone Number: [Employer-Phone-Number]
Type of Business: [employer-Type-Business]
Your Supervisor's Name: [employer-supervisors]
Address: [employer-address]
City: [employer-city]
State: [employer-State]
Zip Code: [Employer-Zip-Code]
Dates of Employment
From: [Emp-From-Date]
To: [Emp-To-Date]
Your Position and Duties: [employer-positions-duties]
Reason for Leaving: [employer-leaving-reasion]
May we contact this employer for a reference?: [contact-employer]
[/EmpHistory]

[references]
References #[group_index]
First Name: [References-Fisrt-Name]
Last Name: [References-Last-Name]
Phone Number: [References-Phone-Number]
Address: [References-Address]
City: [References-City]
State: [References-State]
Zip Code: [References-Zip-Cod]
Occupation: [References-Occupation]
No. of Years Acquainted: [References-Acquired-Years]
[/references]

WordPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@suchitpatel0722 suchitpatel0722 added the bug Something isn't working label Sep 4, 2023
@felipeelia felipeelia added this to the 2.1.0 milestone Sep 11, 2023
@oleole39
Copy link

oleole39 commented Nov 9, 2024

Hello,

Same issue noticed with:

  • PHP 8.3.6
  • WP 6.6.2
  • CF7 6.0
  • CF7 RF 2.0.2

The field validation error warning on repeatable fields is never removed (even after the entry value has been corrected) and makes it impossible to submit the form. No choice but refreshing the page to reset the form and filling it again from scratch.
This only applies to repeatable fields, as other non-repeatable fields from the same form may show validation error, but once the error corrected, they don't prevent anymore the form from being submitted (which is the expected behavior).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants