GithubHelp home page GithubHelp logo

felipeelia / cf7-repeatable-fields Goto Github PK

View Code? Open in Web Editor NEW
31.0 5.0 11.0 1.18 MB

Adds repeatable groups of fields to Contact Form 7.

Home Page: https://wordpress.org/plugins/cf7-repeatable-fields/

License: GNU General Public License v2.0

JavaScript 35.82% PHP 46.34% Shell 17.84%
wordpress wordpress-plugin contact-form-7

cf7-repeatable-fields's Introduction

Hi ๐Ÿ‘‹, I'm Felipe Elia

Associate Director of Platform Engineering @10up

Blogs posts

Connect with me:

felipe_eliaย  felipeelia ย  felipe.eliaย  felipe.eliaย  felipeeliawpย 

Languages and Tools:

WordPress php mysql react cypress GitHub Actions docker elasticsearch git html5 javascript laravel linux nodejs redis circleci

GitHub Stats
felipeelia felipeelia
felipeelia


felipeelia

cf7-repeatable-fields's People

Contributors

berniegp avatar dependabot[bot] avatar felipeelia avatar rtpharry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cf7-repeatable-fields's Issues

[Release] Version 2.0.1

  • 1. Branch: Starting from trunk, cut a release branch named release/2.0.1 for your changes.
  • 2. Version bump: Bump the version number in cf7-repeatable-fields.php, package.json, package-lock.json, readme.txt, and any other relevant files if it does not already reflect the version being released. In cf7-repeatable-fields.php update both the plugin "Version:" property and the plugin CF7_REPEATABLE_FIELDS_VERSION constant.
  • 3. Changelog: Add/update the changelog in CHANGELOG.md and readme.txt, ensuring to link the [2.0.1] release reference in the footer of CHANGELOG.md (e.g., 2.0.0...2.0.1). Update the Unreleased link to 2.0.1...trunk
  • 4. Props: Update CREDITS.md file with any new contributors, confirm maintainers are accurate.
  • 5. Readme updates: Make any other readme changes as necessary. README.md is geared toward GitHub and readme.txt contains WordPress.org-specific content. The two are slightly different.
  • 6. New files: Check to be sure any new files/paths that are unnecessary in the production version are included in .distignore.
  • 7. POT file: Run wp i18n make-pot . languages/cf7-repeatable-fields.pot and commit the file. In case of errors, try to disable Xdebug (see this comment.)
  • 8. Release date: Double check the release date in both changelog files.
  • 9. Merge: Merge the release branch/PR into trunk.
  • 10. Test: Run git pull origin trunk and test for functionality locally.
  • 11. Release: Create a new release, naming the release and the new tag with the new version number (2.0.1). Paste the release changelog from CHANGELOG.md into the body of the release and include a link to the closed issues on the milestone.
  • 12. SVN: Wait for the GitHub Action to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
  • 13. Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/cf7-repeatable-fields/. This may take a few minutes.
  • 14. Close milestone: Edit the milestone with release date (in the Due date (optional) field) and link to GitHub release (in the Description field), then close the milestone.
  • 15. Punt incomplete items: If any open issues or PRs which were milestoned for 2.0.1 do not make it into the release, update their milestone to 2.0.1+1, X.Y+1.0, X+1.0.0 or Future Release.

Issue with Contact Form 7 Multi-Step Forms By Webhead LLC.

Hi, I have tested your plugin using Contact Form 7 Multi-Step Forms
By Webhead LLC. , since it is adding each steps using different forms and form shortcodes in different page/post, wrapping the repeatable fields on the mail body is not possible if the repeatable field is not on the final step,

working perfectly on Contact Form 7 Multi-Step By NinjaTeam except the validation issue.

BUG: Required checkbox fields

Describe the bug

From https://wordpress.org/support/topic/compatibility-issues-with-cf7-5-7/#post-16924132

The update appears to have mostly resolved the required field issues, although there does still appear to be one issue with required checkbox fields where submitting a form with no checkboxes filled out will throw a โ€œOne or more fields have an error.โ€ error but doesnโ€™t indicate which field has the problem. I was able to reproduce it on both our existing site and a fresh installation.

[checkbox* mycheckbox "thing1" "thing2"]

Steps to Reproduce

To be investigated

Form tab contents

To be investigated

Mail tab contents

To be investigated

WordPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Great plugin!

Describe your question

First of all i have to say im amazed with how easy this was to setup on our website!

But i do have some questions about the output to email (if possible)

I would like to have it output in a table (if possible) in order to automate as much information as possible.

For example i have two input fields information 1 and information 2 next to each other.

Then i want a table in the email like:

<th>Information1</th><th>some other information</th><th>Information2</th>
<tr>Value_information1</tr><tr>Empty_value</tr><tr>Value_information2</tr>

How do i do that? ^^

Especially if the repeatable form includes both information 1 and information 2 as both of these fields gets repetable?

Would be great if something like this gets documented in your wiki as well :) Everything else was straight forward.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Nothing happens when pressing on the add button.

Hallo,

I just installed the plugin v.1.1.3 with CF7 v.5.1.7 on a wordpress v.5.3.2. Created a contact form with the following:
[field_group emails id="emails-groups" tabindex:1] [text text-315] [/field_group]

When I ouput the shortcode the form is displaying and I can see the add and remove buttons. The only problem is when I press the add/remove button noting happens.

Error on wpcf7_field_group_remove_button

Hi felipeelia,
I detect a bug when you add a filter for change remove button.
You repeat "wpcf7_field_group_remove_button" filter into class-cf7-repeatable-fields.php.
At line 118 and 127.
I think that the first filter (line 118) shoud named "wpcf7_field_group_remove_button_atts" like the "wpcf7_field_group_add_button_atts" filter. In fact you explain this funcionality at the comments for this filter.

Regards

Uncaught TypeError: Cannot read property 'clone' of undefined

I got this error when i click add btn.

Uncaught TypeError: Cannot read property 'clone' of undefined
at HTMLButtonElement. (scripts.min.js?ver=4.9.8:1)
at HTMLBodyElement.dispatch (jquery-3.3.1.min.js:2)
at HTMLBodyElement.y.handle (jquery-3.3.1.min.js:2)

Sending Group Data to Webhooks

Hello, i use the repeatable fields and send the data to a Webhook.
how can i send the data from a group as JSON Object?
Can you help me?

Could I trigger on click to button?

I have jquery to calculator for price in form. I need re-calculator when someone click to [field_group] button of repeater to add more field in repeater group.
How could I do this?
It seems you used on click before for plugin, and it will take duplicate...

Can not create nested field groups

Can not create nested field groups, I was trying to do the following and it did not work.

[field_group chapters id="chapters-groups" tabindex:1]
   <div class="col-md-12 col-sm-12 col-xs-12" style="padding:0;">
      <label>[textarea* chaptername placeholder "Chapter name" ]   </label>
      [field_group topics id="topics-groups" tabindex:2]
      <label>[text topicname placeholder "Topic name" ]   </label>
      [/field_group]
   </div>
[/field_group]

Groupp should write number for elements

Elements in repeat group should have parameter to write its number
This help our know where we are, which element we are working with in long repeat group

Validation skips required fields on same line.

Hey,

I've got two required fields on the same line (house address and house number), but for some reason the validator skips one of those two fields when sending the form. The user can sent the form by only filling in one while they need to fill in both. How is this possible?

Cheers,

lesJJ

Format Date in Email template issue

Hi,
i have issue with formatting date in email. In classic field (without repeatable group) formatting date in email template working like this [format{field name} โ€œ{date format}โ€]. But when i use it under repeatable group, i am getting shortcode as result. So shortcode under repeatable group is not translated. Maybe your plugin not know it? Am i correct? If yes, how can i fix it?

Thanks

2 repeatable fields in single form are not properly working

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

[Release] Version 2.0.0

  • 1. Branch: Starting from trunk, cut a release branch named release/2.0.0 for your changes.
  • 2. Version bump: Bump the version number in cf7-repeatable-fields.php, package.json, package-lock.json, readme.txt, and any other relevant files if it does not already reflect the version being released. In cf7-repeatable-fields.php update both the plugin "Version:" property and the plugin CF7_REPEATABLE_FIELDS_VERSION constant.
  • 3. Changelog: Add/update the changelog in CHANGELOG.md and readme.txt, ensuring to link the [2.0.0] release reference in the footer of CHANGELOG.md (e.g., 1.1.3...2.0.0). Update the Unreleased link to 2.0.0...trunk
  • 4. Props: Update CREDITS.md file with any new contributors, confirm maintainers are accurate.
  • 5. Readme updates: Make any other readme changes as necessary. README.md is geared toward GitHub and readme.txt contains WordPress.org-specific content. The two are slightly different.
  • 6. New files: Check to be sure any new files/paths that are unnecessary in the production version are included in .distignore.
  • 7. POT file: Run wp i18n make-pot . lang/cf7-repeatable-fields.pot and commit the file. In case of errors, try to disable Xdebug (see this comment.)
  • 8. Release date: Double check the release date in both changelog files.
  • 9. Merge: Merge the release branch/PR into trunk.
  • 10. Test: Run git pull origin trunk and test for functionality locally.
  • 11. Release: Create a new release, naming the release and the new tag with the new version number (2.0.0). Paste the release changelog from CHANGELOG.md into the body of the release and include a link to the closed issues on the milestone.
  • 12. SVN: Wait for the GitHub Action to finish deploying to the WordPress.org repository. If all goes well, users with SVN commit access for that plugin will receive an emailed diff of changes.
  • 13. Check WordPress.org: Ensure that the changes are live on https://wordpress.org/plugins/cf7-repeatable-fields/. This may take a few minutes.
  • 14. Close milestone: Edit the milestone with release date (in the Due date (optional) field) and link to GitHub release (in the Description field), then close the milestone.
  • 15. Punt incomplete items: If any open issues or PRs which were milestoned for 2.0.0 do not make it into the release, update their milestone to 2.0.1, 2.1.0, 3.0.0 or Future Release.

Compatibility with Plugin Send PDF for Contact Form 7?

Hello,

I congratulate you for the beautiful work done on this plugin.
I have a question about sending PDF. I use the Plugin Send PDF for Contact Form 7 plugin and can not integrate the information into the PDF. Pemo email the information is ok.

Thank you

Compatibily with CF7 Google Sheet Connector

Hello,
thanks for the beautiful and great plugin!

I use CF7 Google Sheet Connector for Contact Form 7 plugin and I can not integrate the information into the Google Sheet.

This would be so great. Thank you!

Add group_id to shortcode wpcf7_field_group_add_button_atts

Please, Add grups_id to shortcode
I have multiple repeating fields in one form and I want to change the button text depending on the grups_id
$add_button_atts = apply_filters(
'wpcf7_field_group_add_button_atts',
array(
'grups_id' => $group_id,
'additional_classes' => '',
'text' => '+',
)
);

Duplicate items are not selectable via jQuery.

In line 53 of the script.js file I would suggest changing clone () to clone (true).

var $new_group = $groups.data( 'group-model' ).clone();
to
var $new_group = $groups.data( 'group-model' ).clone(true);

Repeated elements grouping to one after validation fail

Repeated elements grouping to one after validation fail

i'm on wordpress 5.3.
Firstly i had to manually add the wp_enqueue_scripts into my functions.php but this is totally not a problem.

The repeater fields are working almost flawless. But when i submit the form and the validation fails the groups will become one. So one repeated group with 2 field will become 4 fields in the same group

[field_group basic-infos id="basic-info-groups" tabindex:1]
        [text* project id:project class:form-control]
        [text* user id:user class:form-control]
[/field_group]
[submit id:submit class:btn class:btn-primary "SEND REGISTRATION"]

Code Linters

Implement some code linters to enforce WordPress Coding Standards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.