• Resolved pikamander2

    (@pikamander2)


    Contact Form 7 version 5.7 was released today, and it appears to cause an issue where valid repeater field values will produce a red “The field is required.” warning message.

    View post on imgur.com

    Fortunately, this doesn’t appear to prevent a successful submission on our website, although it’s still something that should be looked into if this plugin is ever updated or forked.

    • This topic was modified 1 year, 11 months ago by pikamander2.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey @pikamander2 your thread is kind of old – but this is for everyone who is still looking for an answer.

    Contact Form 7 changed its validation and added a data-name attribute as well as a schema validation.

    The first point is kind of solvable by changing the JS of this plugin.
    In scripts.js after line 39 add following:

    $formControlWrap.attr("data-name", newName);

    And use a minifier tool like https://www.toptal.com/developers/javascript-minifier to minify the js file and replace the scripts.min.js

    This will solve the issue”The field is required.” – but one issue remains – the validation on the fly. Like on change of any field the validation won’t trigger because of the new contact form 7 changes to check against the schema calling a feedback endpoint.
    But yeah the form is now usable – and the validation works for the submission.
    Refernce:
    https://github.com/takayukister/contact-form-7/blob/aead86c2b67985fc4d77d833ad1caa78afa4dbf7/includes/js/src/validate.js#L86

    Let me try to break it down once more for everything to understand it.
    This plugin does rename the names of the fields for example “first_name” will get a new name “first_name__1”. (Reason is pretty clear: It clones the fields, so it needs new incrementing names).

    Plugin Author Felipe Elia

    (@felipeelia)

    @sfdeveloper I’m slowly getting back to this plugin and I’ve applied your solution to the upcoming version. Do you happen to work with the plugin often? I’d like someone else to give it a try before I publish it: https://github.com/felipeelia/cf7-repeatable-fields/archive/refs/heads/trunk.zip

    This version does not fix all the problems but it at least paves the way to do that. It also bumps some minimum requirements. Thanks in advance!

    Thread Starter pikamander2

    (@pikamander2)

    Hey @felipeelia – Thanks for reviving the plugin.

    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"]

    Plugin Author Felipe Elia

    (@felipeelia)

    Thanks, @pikamander2! Any chance you can file a new bug report on the GitHub repo? I’ll try to keep everything there from now on.

    Plugin Author Felipe Elia

    (@felipeelia)

    I’ve moved the new problem to GitHub: https://github.com/felipeelia/cf7-repeatable-fields/issues/61

    As there is no other actionable item in this thread, I’m marking it as resolved.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Compatibility issues with CF7 5.7’ is closed to new replies.