kodie / gravityforms-repeater Goto Github PK
View Code? Open in Web Editor NEWA Gravity Forms add-on that allows specified groups of fields to be repeated by the user.
A Gravity Forms add-on that allows specified groups of fields to be repeated by the user.
Hello, I try to use repeater to make a register of a delivery, but this plugin not work in price field corretly... please make a review on this...
the currency when i set a numer field as currency it put the signals of current currency in the value, when this fiels inside repeater this not work, and a number field with calculation not recongnise this field anymore....
Thanks for any help...
Uploading plugin using FTP. Not appearing in plugins?
The following PHP error is shown when viewing an entry's details in admin if no child fields within the repeater have been filled out.
Warning: Invalid argument supplied for foreach() in repeater-add-on-for-gravity-forms\class-gf-field-repeater.php on line 384.
Small issue that is throwing a notice.
I have disabled ajax on the form as instructed and I have noticed that if I add custom Add and remove markup to the 'Repeater End' it throws a bunch of 'Undefined Index: conditionalLogic' notices when I click the Add button.
the html I have added to each is
<button class="btn btn--tiny btn--primary">Add Another Timesheet</button>
and
<button class="btn btn--tiny btn--secondary">Remove Timesheet</button>
.
Without custom code in there it works without error.
Hi,
I have a large multi page form. It seems the the repeater addon breaks the multi page functionality (can't navigate to the previous/next page via buttons. Have to hit enter in a field to switch to the next page). I also get some javascript error from the plugin in jquery.postcaputer.min.js:
'''
Uncaught TypeError: Cannot read property 'length' of undefined
'''
Would be great if you knew how to fix it....
Seems like this code:
var id = this.id;
var label = jQuery(this).siblings('label').first().text();
value.push(label);
Should just be:
value.push(jQuery(this).val());
The value and label will typically be the same, unless the user checks the "show values" checkbox. I believe that checking the value is the correct thing to do and should always work.
hello, when I have php 5.6.10 activated the plugin creates a weird bug...
when on my wp-admin / plugin list page /wp-admin/plugins.php, the list breaks when getting to this plugin item. the list stops to display so I can't see plugins that are alphabetically after this one.
downgrading my php version to 5.5.26 resolves the bug.
on 5.6, the plugin still works but its really annoying that I cant manage plugins from the admin when this one is active. there is no php errors in my logs...
im in development phase right now so I can easely switch php versions, but it wont be so easy next week when we put the site online...
Please let me know if you have a solution for the plugin to work with ulterior versions of php.
thanks
Hi Kodie,
Could you please test or document how pre-populating checkboxes should work?
I can't figure out how to get them to pre-populate.
If it matters, I'm trying to get them to pre-populate on pages 1 and 2 of a multi-page form (two repeaters, one on page on, one on page 2, each with a checkbox field).
Thanks,
Michael Moore
Hi Kodie,
Thanks for the nice plugin. Are hidden fields supported? They're not on the list of supported field types but should be able to be handled in a very similar fashion to regular input fields.
Thanks,
Michael Moore
I've got a section (image below, section is called Practitioner Details (delegates)) in a repeater that should only show if a radio button is selected as yes:
Once there's a few repeats, you'll get mixes of "yes" and "no" selections. As soon as there is one "yes" selection all of the sections are enabled.
This is using the latest dev version.
Everything was working fine with the plugin (Which is clutch, by the way. Super helpful) until I added some conditional logic and this JS error broke the entire form. The form now has an inline display: none applied to it.
The culprit seems to be this line:
if (childInfo['required']) { childRequired = true; }
If I have a date field inside a repeater the JS calendar doesn't pop up.
The calendar popup on the date field outside of the repeater does work.
There is no compability with plugin "Gravity Forms + Custom Post Types"?
I try add a new custom post type form, but the repeater fields don't save.
Hi,
Is it possible to add conditionial logica to the repeater? because now the sub items of a logica arent visible but the trigger button is :(
Hi Kodie,
after update your plugin I get the following errors:
Notice: Undefined offset: 0 in /Applications/MAMP/htdocs/grell_neu/wp-content/plugins/repeater-add-on-for-gravity-forms/class-gf-field-repeater.php on line 512
Warning: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/grell_neu/wp-content/plugins/repeater-add-on-for-gravity-forms/class-gf-field-repeater.php on line 556
I'll get these errors on a form which is not using your repeater plugin! On the form which is using your plugin are no errors.
TypeError: d.children is undefined
.............../plugins/repeater-add-on-for-gravity-forms/js/gf-repeater.min.js?ver=1.0.9
Date fields have three options for user input.
If I use Date Field or Date Drop Down then all date input field parts get the same ID
The Month field has "input_3_3_1-1-1" and the Day field has "input_3_3_1-1-1" and the year field has "input_3_3_1-1-1".
Worse, add more entries to the repeater, the additional date fields continue to have the same "input_3_3_1-1-1" ID, even if they are in repeated group 2, 3, etc.
To repeat:
Create a repeater with a date field using Date Field or Date Drop Down and inspect the generated HTML. Click the plus to add repeated entries in your repeater. Inspect the generated HTML.
I created a few repeater fields but when I receive a notification email, none of the fields are showing up. Currently I have the notification message using the {all_fields} shortcode. Is there something different I need to do to get repeater fields to show?
Hi Kodie,
I seem to have encountered another issue with the plugin :-/
I am trying to generate a Raw Text Email, but it seems the plugin does not support this. Here is my Notification code, with Autoformatting disabled:
xxx {[Field Name]:[field_id]}
Single Line: {Single Line:1}
{Repeater:6}
Paragraph: {Paragraph:2}
Radio: {Radio:3}
{Untitled:7}
List: {List:4:}
Col: {Column List:5:}
File: {File:8}
I'm using a filter to generate text emails:
// Set Gravity Forms to text Emails
add_filter( 'gform_notification', 'change_notification_format', 10, 3 );
function change_notification_format( $notification, $form, $entry ) {
// change notification format to text from the default html
$notification['message_format'] = 'text';
return $notification;
}
Emails arrive like this:
xxx {[Field Name]:[field_id]}
Single Line: dsaad
a:2:{i:1;a:2:{i:2;a:1:{i:0;s:5:"sddsa";}i:3;a:1:{i:0;s:5:"Other";}}i:2;a:2:{i:2;a:1: {i:0;s:13:"dasdsaasdsads";}i:3;a:1:{i:0;s:5:"other";}}}
Paragraph:
Radio:
List: sdads
Col: sad,ads,dsa
File:
It'd be nice to be able to remove any arbitrary repeated section, not just the last section.
Is there a built-in way to pre-populate the repeater with some data?
It's working really well for submitting data on the site I'm building, now I'd like to add the ability for users to edit entries they've made previously.
I'd prefer to do it server-side, but it looks like if there's no baked-in method, then I could pass my values to the client with wp_localize_script, then use gfRepeater_setRepeater and populate the values manually with JavaScript....but, if there's a shortcut that'd be nice.
Everytime I submit a form I get an error message that displays on the confirmation page. The form goes through but displays this code at the top:
Warning: substr() expects parameter 1 to be string, array given in /home3/sjgas/public_html/contractorsonly/wp-content/plugins/repeater-add-on-for-gravity-forms/class-gf-field-repeater.php on line 143
Can you lend any insight as to why this is happening?
When the Phone Advanced field is included in a repeater set AND Phone Format changed to International, form does not preview.
First of all thanks for the plugin, it seems awesome. But I'm not able to test it already because I got the following error:
Uncaught TypeError: jQuery(...).mask is not a function
Thanks already! Best Regards,
Nick
Hi,
When get the values in the notification email it looks like the image i attach. The Array are visible in the email before the tables where the value is. Anyone know what the problem is? It worked before but when i updated wordpress and gravityforms to the latest version i starting to get this error.
I don't see these types in your list of supported fields, so I believe this is why they don't work. The file field doesn't allow for file upload and the button doesn't work.
The list field works on the frontend but the submission within email is garbage and gets chopped off.
Can you confirm these issues?
I cant able to edit the fields of repeater in the admin panel of form entries, how to edit those fields of repeater
The GF way of doing sections is kind of weird, since there's no actual nesting, but all fields after a section are considered to be part of the section until the next section or page starts.
Outside of repeaters, conditionally hiding a section will hide all fields inside that section.
Inside a repeater just the section header itself seems to be hidden, the subsequent fields are still shown.
Is any idea how to fix it?
All data provided in all other fields in repeater - lose their values
Right now even if I pass pre-populate data for a repeater to be repeated multiple times it only repeats once.
Eg. if I have input1=asdf&input2=qwer&input3=zxcv
When I click the plus button to add additional repeater sections the pre-populated data shows up in the new sections.
One of the most common use cases for pre-populating data is probably for users to re-edit data they've entered previously. In such a case, the user will expect to see the data they entered initially. If I pass in pre-populate data, I think it should show up on the screen.
While I recognize that product fields are missing from your supported fields list, I would like to help make them supported if at all possible.
Have you looked into the issue before? Do you have a suggested starting place?
No time rush on this, I'm just interested in contributing :)
The repeater fields are not editable through the admin interface. Any clues?
If would be useful if the opening and closing blocks themselves could be shown/hidden conditionally, in instances where you don't want to allow people to add any items.
Sometimes when going back to the form after submitting an entry the repeater fields are pre-populated with the values which were submitted with the previous entry.
I'm using a simple repeater with a single line text input within it.
For example, if I submit the form with 3 repetitions of the input with values "one", "two", "three" the next time I load the form those 3 values will be pre populated in the the new form rather than being an empty repeater. If I reload the page the repeated is cleared to its default empty values.
Is there somewhere in the browser cache or database which stores repeater data which might not be getting cleared after the first form submission?
Thanks!
I've got some name and address fields in a repeater. if a user doesn't fill out one of the optional name or address parts (eg. Name Suffix, or Address Line 2) then those empty values don't get included in the serialized string that's stored with the form.
When trying to de-serialize these values to pre-populate or otherwise use the values, this results in ambiguity about which input a value corresponds to.
It would be convenient if the serialized string preserved the input name somehow.
See the attached screenshot for a visual explanation.
When I export a form's entries in to Excel any data that was in a repeater field is all placed in a single cell. How do I export to Excel allowing the data in the repeater field to appear in the corresponding separate rows?
It should be possible to start with / allow a minimum of zero instances of a repeated section. In my case I ask for employment history, and require certain fields like date hired / left for each instance. Users without an employment history will be unable to fill out this form. I was able to work around this constraint by adding another field ("Have you been employed before?") and making all of the fields in the repeated section conditional, but that is cumbersome to manage and imposes constraints on the kind of conditional logic that can be used in the repeated fields.
Whenever I add a repeater field into a form, the form starts getting "messed up"... and the repeater buttons don't even work (tried in both preview mode and on the rendered form).
For example, the progress bar starts showing up on my multipage form, when I set it back to "steps" and save the form, it switches back to progress bar and doesn't save changes to the form. There are a couple other small quirks too but overall the repeater plugin basically breaks my form. When I disable the repeater plugin, things go back to normal.
There are no javascript errors showing up either. Have you seen this kind of behavior before? Would really like to get the repeater field working and it looks like a great plugin other than this. Thanks for your help!
I'm getting error messages in gf-repeater.js on line 290
if (childRequired) {
var splitName = newInputName.replace('.', '_').split(/(_|-)/);
newInputName is undefined.
It looks like this is only happening when you have a required date field which has an icon (calendar or custom) set. It seems that the icon image URL is put in a hidden field which has no name property.
This results in inputId having a value, but inputName being undefined on lines 227/228, then since the date field is required, gf-repeater.js tries to split the undefined newInputName.
It seems that that this only causes an actual problem sometimes. One of my forms won't advance to the next page because of the error, but another one of my forms will. Both are multi-page and neither are using ajax. The error shows up in the console in both cases. I haven't figured out what's different between the two forms. For the time being I just edited gf-repeater.js to check if(newInputName && childRequired).
Hi!
I've got a multi-page form with a repeater on page 1.
When I submit my form using plugin version 1.0.8 the data saves correctly, but in version 1.0.9 I get empty values. Interestingly, it does show the correct number of empty values, just not the values themselves.
The form I'm testing this on is extremely simple. Page one is just a repeater with a single text field in it. Page two has a text field and a radio button.
Thanks!
I have a section inside of the repeater which I only want to show if a field, which is outside of the repeater has a certain value.
It seems that the conditional logic checks only allow me to pick fields inside the repeater, otherwise the form fails to render with the message: "child is undefined".
Hi Kodie,
I am trying to produce a formatted table of entries from a GF which has both non-repeated fields and repeated fields. The data for the repeated fields seems to be stored in the Wordpress database in an encoded form ["# id, lead_id, form_id, field_number, value
'3', '1', '1', '1', 'a:1:{i:1;a:4:{i:9;a:1:{i:0;s:4:"1234";}i:10;a:1:{i:0;s:22:"Where Your Treasure Is";}i:14;a:0:{}i:15;a:0:{}}}'] in table wp_rg_lead_detail. Do you know of any way I can produce a sub-table with this repeated data expanded into columns with the correct headers.
Any working examples would be greatly appreciated,
Cheers.
Hi, I'm unsure if this is covered elsewhere, but when I use the plugin to repeat a group of fields with conditional logic, the hidden fields no longer show given the proper condition.
Everything was working fine with the plugin (Which is clutch, by the way. Super helpful) until I added some conditional logic and this JS error broke the entire form. The form now has an inline display: none applied to it.
I noticed the radio fields inside a repeater loses the selected value when inside of a page, and using the "previous page" button.
when I duplicate the same field and move it out of the repeater, it works fine.
im using this component for a a project at work... would be awesome if you could fix it... its a bit of a show stopper for us.
Thanks
Hi Kodie,
Thank you for this outstanding plugin, very useful!
I found the following issue:
For every GF I add add_filter( 'gform_tabindex', '__return_false' );
to disable the tab-indexes.
I noticed that this displays in the HTML as tabindex="NaN"
For example in
<select name="input_4-1-1" id="input_2_4-1-1" onchange="gf_apply_rules(2,[9,10]);" class="medium gfield_select" data-repeater-inputid="1" tabindex="NaN">
Best would to remove the tabindex attribute completely when gform_tabindex is false.
Kind regards,
RIan Rietveld
Hi Kodie,
It would be convenient if there were a JS trigger that we could listen for to detect when the repeater is done loading.
This would allow users to run custom JavaScript functions that need to interact with the repeater in some way.
I'm getting errors "jQuery(...).mask is not a function" on gf-repeater.js, line 254.
Do I need to install an extra jQuery library for that to work or is it likely that I've broken something else locally? I'm using gravityforms-repeater Version 1.0.8.
I've got a series of forms that are chained together. It's a several-hundred question scholarship application process, so each section is a form. Upon completion of one form the user is sent directly to the next form using the Gravity Forms Page type confirmation.
It seems that at least in a page type confirmation the jQuery.captures data is not cleared so values typed in one form overwrite values in a subsequent form if the field names match.
I have worked around this issue by appending an additional hidden field to the form which holds the formId. During initialization if the jQuery.captures formId doesn't match the current form ID, gfRepeater_submitted is not set to true.
// Initiation right away
jQuery(document).ready(function($) {
gfRepeater_patchMask();
var theForm = jQuery('.gform_wrapper form');
var formId = jQuery('.gform_wrapper form').attr('id');
theForm.append('<input type="hidden" name="the_hidden_form_id" value="' + formId + '">');
theForm.capture();
if (jQuery.captures()) {
// check if it's the same form
if(jQuery.captures('the_hidden_form_id') == formId){
gfRepeater_submitted = true;
}else{
// console.log("Found old data, not counting as submitted");
}
}
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.